Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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:

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.

share|improve this question

migrated from Mar 21 '12 at 8:01

This question came from our site for professional and enthusiast programmers.

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
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.