OS version:
[email protected] etc]# cat Redhat-release
Red Hat Enterprise Linux Server Release 5.4 (Tikanga)
---run Yum error
[email protected] ~]# Yum Install dialog
There was a problem importing one of the Python modules
Required to run Yum. The error leading to this problem was:
No module named Yum
Install a package which provides this module, or
Verify the module is installed correctly.
It ' s possible that the above module doesn ' t match the
Current version of Python, which is:
2.7.8 (Default, Jul 16 2014, 08:48:25)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-52)]
If You cannot solve this problem yourself and go to
The Yum FAQ at:
Http://wiki.linux.duke.edu/YumFaq
[Email protected] ~]# Rpm-qa |grep Yum
Yum-security-1.1.16-21.el5
Yum-updatesd-0.9-2.el5
Yum-metadata-parser-1.1.2-3.el5
Yum-3.2.22-39.0.2.el5
Yum-rhn-plugin-0.5.4-26.0.1.el5
[[email protected] ~]# Whereis python
Python:/usr/bin/python2.4/usr/bin/python/usr/lib/python2.4/usr/include/python2.4/usr/share/man/man1/python.1.gz
[email protected] ~]# which Yum
/usr/bin/yum
[Email protected] ~]# Vi/usr/bin/yum
#!/usr/bin/python2.4----This line needs to be modified to /usr/bin/python2.4
Import Sys
Try
。。。。
"/usr/bin/yum" 32L, 806C written
-----Run Yum again for normal operation
[[email protected] ~]# Yum install list
Loaded Plugins:rhnplugin, security
This system isn't registered with ULN.
ULN support would be disabled.
File:///media/oel/Server/repodata/repomd.xml: [Errno 5] OSError: [Errno 2] No such file or directory: '/media/oel/server/ Repodata/repomd.xml '
Trying other mirror.
Setting up Install Process
No Package list available.
----also updated under/USR/SBIN/YUM-UPDATESD
[Email protected] etc]# VI/USR/SBIN/YUM-UPDATESD
#!/usr/bin/python2.4-tt
---restart service
[Email protected] etc]# service yum-updatesd restart
stopping yum-updatesd: [FAILED]
Starting yum-updatesd: [OK]
Python upgrade to 2.7.8 causes Yum to run abnormally: No module named Yum