LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Accidently removed the RPM DB (https://www.linuxquestions.org/questions/linux-server-73/accidently-removed-the-rpm-db-641815/)

rvbalraj 05-13-2008 02:44 AM

Accidently removed the RPM DB
 
I Accidently removed the RPM DB in remote RHEL 4 server. I used command list following commands on remote server.

# rpm -e rpm -e MySQL-shared-5.0.45-0.glibc23
# rpm -e rpm -e MySQL-shared-5.0.45-0.glibc23 -nodeps
# rpm -e rpm -e MySQL-shared-5.0.45-0.glibc23 --nodeps

After did above command
#rpm
-bash: rpm: command not found

I did this on remote cpanel installed server

chrism01 05-13-2008 07:11 PM

That's because you repeated
rpm -e
you only need it once per line for the MySQL stuff.
rpm -e rpm
removed the rpm

hopefully somewhere in the menus there'll be an rpm install option.

eggixyz 05-13-2008 09:41 PM

Hey There,

You can grab the RPM rpm file and use rpm2cpio to extract it and install it.

rpm2cpio /dir with/your/rpm-*.rpm | cpio -dimv

otherwise, boot off of your rescue cd ("linux rescue") and mount your root partition (/dev/hda or whatever it is), then chroot that mountpoint so it appears to be / and you can reinstall the rpm package using the rpm binary on your rescue cd.

Hope that helps!

, Mike


All times are GMT -5. The time now is 12:15 PM.