LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-09-2006, 07:16 PM   #1
RCbeta
LQ Newbie
 
Registered: Oct 2003
Location: Minnesota
Distribution: Redhat
Posts: 8

Rep: Reputation: 0
Deleted rpm manager


ok ... i was really stupid .. i was cutting and pasting commands and mistakenly deleted rpm

rpm -r rpm

how do i put it back on to the system? Fedora Core 3 ... suggestions welcome ...

Randy
 
Old 04-09-2006, 07:58 PM   #2
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
Couple ways to do this. Since rpm does not exist you can't use rpm to extract a new copy back. So you can get the source of rpm and compile and install that from www.rpm.org

Another way is to boot up with say knoppix live cd and extract the contents of thr rpm*.rpm file to the harddrive and place where the contents show they should be.

Brian1
 
Old 04-09-2006, 08:06 PM   #3
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
Have you tried re-installing rpm from the installation cds?

Put disk 1 in the drive, mount it, then browse until you find it. Then install manually from the command line with 'rpm -i'.
 
Old 04-09-2006, 08:10 PM   #4
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 58
Third way is to boot from the installation media into rescue mode and use rpm from the media to install the rpm packages.

Fourth way is to download/use the FC3 recsue CD then install the rpm packages;
http://download.fedora.redhat.com/pu...6-rescuecd.iso
 
Old 04-09-2006, 08:20 PM   #5
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
Didn't know the rpm tool was active from the rescue cd there Lenard.

Brian1
 
Old 04-10-2006, 09:03 AM   #6
Lenard
Senior Member
 
Registered: Dec 2005
Location: Indiana
Distribution: RHEL/CentOS/SL 5 i386 and x86_64 pata for IDE in use
Posts: 4,790

Rep: Reputation: 58
Yea, most people do not know aboutusing rpm from the rescue mode......... perhaps a down and dirty recovery guide is in order.

After booting into rescue mode but before using the chroot command the excutable version of rpm needs to be 'pulled' from the media first so one can use it to re-install the rpm packages.

So lets start by creating a location for the rpm files and rpm itself;

mkdir /mnt/sysimage/root/RPM_restore

Then copy rpm from the media;

cp /mnt/runtime/usr/bin/rpm /mnt/sysimage/root/RPM_restore/rpm

Now use the chroot command;

chroot /mnt/sysimage

The next step is to copy the rpm packages from the CD to someplace to re-install them;

mount /mnt/cdrom (or whichever is the mountpoint for the CD/DVD drive)
ls -l /mnt/cdrom/Fedora/RPMS/rpm* (to get the list of the packages to copy)

Copy each of the packages listed from the output to where the 'pulled' rpm is located, for example;

Code:
cp /mnt/cdrom/Fedora/RPMS/rpm-4.3.2-21.i386.rpm /root/RPM_restore/rpm-4.3.2-21.i386.rpm
Repeat until all files are copied. One may find it a bit easier to reboot the system normally and then copy or install the rpm packages from the CD/DVD. In either case once all the rpm packages are in the same location install them all at once, for example;

rpm -ivh rpm*.rpm
/root/RPM_restore/rpm -ivh /mnt/cdrom/Fedora/RPMS/rpm*.rpm

Sample results(using the force switch since I do not need to re-install them);

Code:
# /root/RPM_recover/rpm -ivh /root/RPM_recover/rpm*.rpm --force
Preparing...                ########################################### [100%]
   1:rpm-libs               ########################################### [ 17%]
   2:rpm                    ########################################### [ 33%]
   3:rpm-build              ########################################### [ 50%]
   4:rpmdb-CentOS           ########################################### [ 67%]
   5:rpm-devel              ########################################### [ 83%]
   6:rpm-python             ########################################### [100%]
hth

Last edited by Lenard; 04-10-2006 at 09:07 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Important Folder deleted by mistake using the Gnome File Manager. chirucu Linux - General 4 03-08-2006 08:55 AM
ahhh I deleted RPM please help!!:eek: unixmad Linux - Newbie 12 10-02-2004 12:06 PM
Deleted RPM manager in Mandrake 9.2 eloyj88 Linux - Software 4 04-25-2004 07:37 PM
[Gentoo file manager] Install RPM from the file manager? Coume Linux - Software 2 12-10-2003 02:21 AM
rpm manager Touragan Linux - Networking 2 02-01-2002 01:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration