Linux yum command deleted
Q. By accident my yum command was deleted under Red Hat Enterprise Linux version 5.x. Now I'm not able to download and update system using RHN. How do I fix this issue without reinstalling RHEL again?
A. You can try any one of the following solutions to restore yum:
(a) Copy yum command (/usr/bin/yum) from other working system (same version and architecture) using ssh / scp command.
(b) Download yum rpm itself from RHN. First, log into RHN. Select the "Channels" tab then select the "Red Hat Enterprise Linux" channel for your system in the channel name table. You can search RPM and then select "Package" link. Once downloaded just run rpm command over yum command.
# rpm -ivh --force rpm*
(c) Download yum source rpm from public Red Hat ftp server and rebuild yum rpm:
# wget http://ftp.redhat.com/pub/redhat/linux/enterprise/5Server/en/os/SRPMS/yum-3.0.1-5.el5.src.rpm
# rpm -ivh yum-3.0.1-5.el5.src.rpm
# cd /usr/src/redhat/SPECS
# rpmbuild -bb yum.spec
# rpm -ivh --force /usr/src/redhat/RPMS/noarch/yum-3.0.1-5.noarch.rpm
# yum --version
(d) Grab yum rpm from one of the CentOS mirror and just install it.
(e) Copy yum binary from your backup tape device.
(f) Copy yum RPM from updated media CD / DVD and install the same using rpm command.
Subscribe to our free e-mail newsletter or RSS feed to get all updates.
You can Email this page to a friend.
Related Other Helpful FAQs:
- Linux LILO boot procedure freezes with LI characters (Lilo boot loader LI error)
- grub.conf for Windows vista or xp dual boot
- How do I Be More Productive In Vim?
- Stop Ubuntu / Debian Linux From Deleting /tmp Files on Boot
- Find files that do not have any owners or do not belong to any user under Linux/UNIX
Discussion on This FAQ
Leave a Reply
We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!
Tags: enterprise linux, linux yum command, red hat enterprise, redhat rpms, rhel, rhel 5, yum command, yum was deleted




April 19th, 2008 at 4:01 pm
is it possible install yum on red hat enterprise linux 4 with this methode?
thx
April 19th, 2008 at 5:17 pm
no, it is not recommended to mix up2date with yum. This is RHEL5/CentOS 5 specific issue