Re: I broke yum
Alois Steindl <[email protected]> Sat, 6 Apr 2013 11:42:18 +0200
| Newsgroups | gmane.linux.rpm.yum |
|---|---|
| Message-ID | <[email protected]> |
Hello, it seems that you have seriously trashed your yum. In order to reinstall it, you have to choose the right version (your installed python is newer than the requested one, so I guess that you tried to install a too old version of yum. Browse to a repository for your installed version of the OS, download the found yum (it should be newer than the one you tried; maybe it helps to type rpm -q yum to get the proper version. Then try to install yum using rpm. If there are more unresolved dependencies, download these also and install them, by calling rpm -U yum*.rpm <and all other packages> until the problem is resolved. Since you have a quite old OS installed, I would also suggest to upgrade to a newer version. Alois Am 06.04.2013 07:47, schrieb Iman Khabazian: > *[root@n ~]# yum install git* > > 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 > > > > 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.4 (#1, Nov 8 2007, 22:06:01) > > [GCC 3.4.6 20060404 (Red Hat 3.4.6-3)] > > > > If you cannot solve this problem yourself, please go to > > the yum faq at: > > http://wiki.linux.duke.edu/YumFaq > > * * > > *[root@n ~]# which python* > > /usr/bin/python > > > > * [root@n ~]# ls /usr/bin/* | grep python* > > /usr/bin/python > > /usr/bin/python2 > > /usr/bin/python2.4 > > > > *[root@n ~]# python -V* > > Python 2.4.4 > > > > *[root@n ~]# cat /etc/redhat-release* > > Red Hat Enterprise Linux ES release 4 (Nahant Update 4) > > > > *[root@n ~]# uname -a* > > Linux n.sites.net 2.6.18-028stab056 #1 SMP Mon Nov 2 13:19:07 UTC 2009 i686 > i686 i386 GNU/Linux > > > > I have tried to use rpm to re-install yum like this: > > > > *[root@n ~]# sudo rpm -Uvh > http://dl.atrpms.net/all/yum-3.2.22-4.el4.noarch.rpm --replacefiles* > > Retrieving http://dl.atrpms.net/all/yum-3.2.22-4.el4.noarch.rpm > > warning: only V3 signatures can be verified, skipping V4 signature > > error: Failed dependencies: > > /usr/bin/python2.3 is needed by yum-3.2.22-4.el4.noarch > > pygpgme is needed by yum-3.2.22-4.el4.noarch > > python(abi) = 2.3 is needed by yum-3.2.22-4.el4.noarch > > python-iniparse is needed by yum-3.2.22-4.el4.noarch > > rpm >= 0:4.4.2 is needed by yum-3.2.22-4.el4.noarch > > yum-metadata-parser >= 1.1.0 is needed by yum-3.2.22-4.el4.noarch > > > > I think perhaps yum is being installed to work with python 2.3 which I > don’t even have (I have 3 separate versions for 2.4.4) > > This also leads me to believe I have yum: > > > > *[root@n ~]# sudo find / -mount -name yum -type f -ls* > > 3557795 4 -rwxr-xr-x 1 root root 779 Aug 28 2007 > /usr/bin/yum > > *[root@n ~]# rpm -qa | grep yum* > > yum-2.4.3-0.5.el4 > > Any thoughts? >