-bash: rpm: command not found
I have accidentally removed rpm from centos 6.3 version 64-bit. How can I install it rpm back
I have accidentally removed rpm from centos 6.3 version 64-bit. How can I install it rpm back
This is a pretty bad situation but as long as you have the command line tools available, you should be able to rescue the situation.
/bin/rpm --version
- if you get something like RPM-Version 4.8.0
rpm is still there.)__db.00*
files in /var/lib/rpm/
. If you did loose your rpm database I guess you should reinstall your system/restore from backup.Instead of compiling from source I'd recommend getting the binary RPM for your CentOS version and extract it manually.
# execute all following commands as root, especially "cpio" at the end
cd /
wget http://centos.bio.lmu.de/6/os/x86_64/Packages/rpm-4.8.0-32.el6.x86_64.rpm
rpm2cpio rpm-4.8.0-32.el6.x86_64.rpm | cpio -idmv
Now you should have an rpm command again.
Follow the steps given here: http://deadlockprocess.wordpress.com/2010/07/18/how-to-reinstall-rpm-and-yum-without-rpm-and-yum-in-centosrhel/
Get the sourcecode from www.rpm.org
and compile it.
I don't think this is good advice. With such a critical component as rpm you should be 100% sure that you get exactly the rpm as Red Hat/CentOS built it. The CentOS "rpm-4.8.0-32.el6.src.rpm" contains 74 additional patches.
Asked: 2013-10-26 03:39:52 -0500
Seen: 7,934 times
Last updated: Oct 27 '13