LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How to Re-install YUM (https://www.linuxquestions.org/questions/linux-software-2/how-to-re-install-yum-864026/)

infosrig 02-21-2011 07:11 AM

How to Re-install YUM
 
Accidently I uninstalled yum package.
How to re-install it.

CentOS 5.5
64bit
2.6.18-194.el5

Code:

[root@gs13 etc]# yum update
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.3 (#1, Nov 11 2010, 13:30:19)
[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://wiki.linux.duke.edu/YumFaq


forgottenromeo 02-21-2011 08:56 AM

have you tried sudo apt-get yum

knudfl 02-21-2011 09:25 AM

( There is no apt-get in CentOS ! )

# yum deplist yum : Which you of course can't do with no 'yum'.
The dependency list is here :
python : 2.4.3-27.el5
python-urlgrabber.noarch 3.1.0-5.el5
yum-metadata-parser : 1.1.2-3.el5.centos
python-sqlite : 1.1.7-1.2.1
yum.noarch 3.2.22-26.el5.centos
yum-fastestmirror.noarch 1.1.16-14.el5.centos.1
rpm-python : 4.4.2.3-18.el5
rpm : 4.4.2.3-18.el5
python-elementtree : 1.2.6-5
python-iniparse.noarch 0.2.3-4.el5

You can get the packages here http://mirror.centos.org/centos/5.5/
os/ : Packages for i386 or x86_64
updates/ : for i386 or x86_64 .

The command 'uname -a' will tell, if you require i386 or x86_64 packages.
( The packages are on the install DVD / cd set too, unless it's a live cd.)

The packages can then be installed with # 'rpm -Uvh --force <package>'.

..

infosrig 02-21-2011 10:30 PM

Quote:

Originally Posted by knudfl (Post 4265928)
( There is no apt-get in CentOS ! )

# yum deplist yum : Which you of course can't do with no 'yum'.
The dependency list is here :
python : 2.4.3-27.el5
python-urlgrabber.noarch 3.1.0-5.el5
yum-metadata-parser : 1.1.2-3.el5.centos
python-sqlite : 1.1.7-1.2.1
yum.noarch 3.2.22-26.el5.centos
yum-fastestmirror.noarch 1.1.16-14.el5.centos.1
rpm-python : 4.4.2.3-18.el5
rpm : 4.4.2.3-18.el5
python-elementtree : 1.2.6-5
python-iniparse.noarch 0.2.3-4.el5

You can get the packages here http://mirror.centos.org/centos/5.5/
os/ : Packages for i386 or x86_64
updates/ : for i386 or x86_64 .

The command 'uname -a' will tell, if you require i386 or x86_64 packages.
( The packages are on the install DVD / cd set too, unless it's a live cd.)

The packages can then be installed with # 'rpm -Uvh --force <package>'.

..

Thank you verymuch for rply knudfl!!

I downloaded the python packages from as you mentioned URL.
I couldnt find make or install files there. Where to install those and how? in etc?. Since I am newbie now only learning things.
pls help..

knudfl 02-22-2011 09:01 AM

All packages are to be installed with 1) su 2) rpm -Uvh --force <package>
There is no 'make', etc. in a binary package.


You forgot the reply for this : 'uname -a' : Please tell, which output you got.

The architecture (i386 or x86_64) is important when downloading the packages.

..

infosrig 02-22-2011 10:24 PM

Quote:

Originally Posted by knudfl (Post 4267347)
All packages are to be installed with 1) su 2) rpm -Uvh --force <package>
There is no 'make', etc. in a binary package.


You forgot the reply for this : 'uname -a' : Please tell, which output you got.

The architecture (i386 or x86_64) is important when downloading the packages.

..

Thanks for the explanation.
CentOS 5.5
>uname -a
x86_64 GNU/Linux

infosrig 02-23-2011 05:33 AM

Some of the packages I couldn't find in that location.

tnx in advnce 4 rply!!!

knudfl 02-23-2011 03:57 PM

Python-2.4.3-27.el5_5.3.x86_64.rpm is in updates
http://mirror.centos.org/centos/5.5/...5.3.x86_64.rpm

All other packages http://mirror.centos.org/centos/5.5/os/x86_64/CentOS/

infosrig 02-23-2011 11:51 PM

Python Packages installed successfully but for yum..
I am getting following Error

Code:

[root@gs13 Downloads]# rpm -Uvh --force yum-3.2.22-26.el5.centos.noarch.rpm
error: Failed dependencies:
        yum-fastestmirror is needed by yum-3.2.22-26.el5.centos.noarch
[root@gs13 Downloads]# rpm -Uvh --force yum-fastestmirror-1.1.16-14.el5.centos.1.noarch.rpm
error: Failed dependencies:
        yum >= 3.0 is needed by yum-fastestmirror-1.1.16-14.el5.centos.1.noarch
[root@gs13 Downloads]#

tnx in advance!!

EDDY1 02-23-2011 11:57 PM

Looks like you need to install yum- fastest mirror first.

infosrig 02-23-2011 11:57 PM

YES DONE IT!!!
I installed simultaneously all yum packages by rpm -Uvh --force yum*rpm. Above error resolved.


Thank you soooo much for helping me to install YUM Packages..

knudfl ,I dont know how to thank you.. :)

I installed the PIRUT also by yum!!! :)


All times are GMT -5. The time now is 10:34 PM.