Ok, I've really ballsed up a server and wondering if the easiest way from this point is to reinstall the OS and restore the files. (We have file backups, but not bootable server backups)

I stupidly followed this tutorial, without reading the whole thing: http://wiki.railsmachine.com/RpmforgeRepository

And the fix posted at the bottom didn't work. I tried to uninstall and reinstall python from source, and that appears to have made things worse. at the minute, the main errors I'm seeing are:

[root@ tmp]# yum instal asjkdhaskdh
-bash: /usr/bin/yum: /usr/bin/python: bad interpreter: No such file or directory

And when I tried to install from source, I was told I have no C compiler. Is there another way of reinstalling Python that I should try? I'm on CentOS.

Any help greatly appreciated! Thanks guys.

  • This should be on serverfault, not stackexchange. – Burhan Khalid Mar 20 '12 at 10:56
  • I've flagged it for transfer to Server Fault. – Li-aung Yip Mar 20 '12 at 11:26
  • The easiest would probably be to boot from a bootable media, wipe OS partition and reinstall. (You do have / and /home on different partitions, right?) – Maxim Egorushkin Mar 21 '12 at 9:05

Have you tried to install python using rpm? Just download RPM file from distribution for your architecture and issue something like

rpm -Uvh python-2.6.6-29.el6.i686.rpm

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy