LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   problem with yum (missing python module) (http://www.linuxquestions.org/questions/linux-software-2/problem-with-yum-missing-python-module-836832/)

Al-Kateb 10-07-2010 05:00 PM

problem with yum (missing python module)
 
Hello everybody, It's my first post in this forums. i visited this website a lot before finding answers for different questions but this time i got a question which i could not find a topic for not in this website nor in the others.

i have a testing server (Centos 5.4) with cpanel installed, once i ran a script which erases log files by using the find and rm command.

anyway looks like this script deleted one of the modules to python, the logging module. so python stopped working, i thought reinstalling it should solve the problem so i downloaded the tar ball and reinstalled python from source and it's all the same.

now yum command isn't working because it's giving me this error "no module named logging".

i decided to synchronize the whole python folder /usr/lib/python2.4/ from the live server using rsync and it did not help

i searched for the yum rpm package and i downloaded and installed yum-3.2.22-20.el5.centos.src.rpm using rpm and it did not help.


so i don't know how could i solve this problem? or what am i missing here?

thanks for your replies in advance

AlucardZero 10-07-2010 06:45 PM

What is the exact command you are running and then actual, full error you are getting when you try to run yum? Use copy and paste.

Al-Kateb 10-07-2010 07:22 PM

the command i am running is

Code:

yum update
the error i am getting is

Code:

There was a problem importing one of the Python modules
required to run yum. The error leading to this problem was:

  No module named logging

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.4.3 (#1, Sep  3 2009, 15:37:37)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-46)]

If you cannot solve this problem yourself, please go to
the yum faq at:
  http://wiki.linux.duke.edu/YumFaq


Al-Kateb 10-09-2010 12:14 PM

btw i wanted to mention that i tried to install the logging module, so i downloaded it and tried to run the setup.py and it gave me syntax error!

any idea of how this could be solved?

quanta 10-09-2010 01:24 PM

Quote:

Originally Posted by Al-Kateb (Post 4122253)
btw i wanted to mention that i tried to install the logging module, so i downloaded it and tried to run the setup.py and it gave me syntax error!

any idea of how this could be solved?

Again, copy and paste the error here. Did you read the smart questions.

RockDoctor 10-09-2010 01:35 PM

Quote:

Originally Posted by Al-Kateb (Post 4122253)
btw i wanted to mention that i tried to install the logging module, so i downloaded it and tried to run the setup.py and it gave me syntax error!

any idea of how this could be solved?

Why not just download the yum rpm from the appropriate repository and reinstall it, overwriting any old files? man rpm for details.


All times are GMT -5. The time now is 10:30 AM.