Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I've recently registered a VPS and am trying to update the version of PHP installed on it. I'm used to Ubuntu rather than Redhat so I need a bit of advice on how to solve this problem.

Yum seems to be having a bit of a nightmare, I've tried installing it but at various points get to error messages or dead links and haven't found anything near a recent tutorial online.

When I run rpm -q yum I get yum-3.2.22-26.el5.centos so I think to an extent my installation was succesful however when I run yum then I get the following response:

`Please install a package which provides this module, or
verify that the module is installed correctly.

It's possible that the above module doesn't match the
current version of Python, which is:
2.7.1 (r271:86832, Mar  6 2011, 09:56:34) 
[GCC 4.1.2 20080704 (Red Hat 4.1.2-48)]

If you cannot solve this problem yourself, please go to 
the yum faq at:
  http://yum.baseurl.org/wiki/Faq`

Nothing in the FAQ seems to be working. Any ideas as to whats going on?

share|improve this question

2 Answers 2

up vote 3 down vote accepted

You're issue is you upgraded the system python. Yum has a lot of python modules that you broke by upgrading python.

It is saying you have version 2.7 installed but no redhat 5 has 2.4.

You need to install a valid rpm version for python2.7 which doesn't kill the 2.4 install

share|improve this answer

You've replaced the system Python, which yum is installed against. Get the python package via HTTP and use rpm to install it.

share|improve this answer
    
which python package should I be looking to get? –  Ben Stephenson Jun 27 '11 at 12:27
1  
THE python package. From CentOS. –  Ignacio Vazquez-Abrams Jun 27 '11 at 12:42

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.