LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   ahhh I deleted RPM please help!!:eek: (https://www.linuxquestions.org/questions/linux-newbie-8/ahhh-i-deleted-rpm-please-help-eek-237654/)

unixmad 10-01-2004 04:00 PM

ahhh I deleted RPM please help!!:eek:
 
I have completely obliterated fedora 2 redhat package manager, rpmbuild, rpmcpio the lot,

is there any way I can re-install rpm without RPM? I cant find the source code in tar or gz format anywhere all instances of redhat package manager are in rpm format, thus I cant re-install as I no longer have the software. Is there a way to fix this as I dont have to re-install as this is the best I have had my linux box set up and I have also manged to work around many bugs in my system to have a good setup by my standards :-).

Any help is needed and appreciated

Heres hoping
David:eek:

jschiwal 10-01-2004 04:36 PM

If you can't find the rpm command somewhere on the install disk, you can download the tarball here. I think this is the binary rather than the source, but it includes a lot of header files and man pages and other programs like rpm2cpio.

I think you may need to run: make install as root from the extracted directory to install and set up the rpm system.

Good Luck!

ftp://ftp.rpm.org/pub/rpm/dist/rpm-4.1.x/

unixmad 10-01-2004 04:43 PM

Thank you, I dont think the rpm is on the fedora core 2 install disk but I will take another look, failing that I will compile and use source code temporarly if all goes well

David

jschiwal 10-01-2004 04:50 PM

You response came while I was editing my original message. You may want to re-read it above.
I don't know if running make will leave you with a re-initialized rpm database however. Better look at the read me files and study the makefile first.

The binary is there however in the /bin subdirectory of the extracted tar-ball package. You may need the cooresponding library and binary files installed also so you aren't mixing versions. Or download the version you know you need, as there are several versions available on the ftp site, however not all versions have a tarball.

unixmad 10-01-2004 04:56 PM

yeah I noticed that, I need lib rpm 4.x ..... im studying the docs I will get back to you on that :-)

Tinkster 10-01-2004 05:05 PM

Another alternative would be to just use MC.
You can "open" the rpm as if it were a directory,
and then copy things into the right locations.



Cheers,
Tink

unixmad 10-01-2004 05:35 PM

I already have mc installed but that says that all my rpms are inconsistent extfs archives, Im surprised a simple tool hasnt been designed for this kind of thing happening? The source is also moaning about everything ..... I think I may have to re-install , if its not one thing its another also the rpms that midnight commander is saying are corrupt ........ well many of them i have installed before with no problems(before i obliterated rpm)

Tinkster 10-01-2004 06:57 PM

If you're about to re-install give Slack or Debian a shot ;)




Cheers,
Tink

unixmad 10-02-2004 07:51 AM

Yeah im considering it , however you see how during the fedora install rpms are installed is there anyway I can access that command on the disk? its just I have the cd mounted rescue mode but I dont no where to look for it

David

chrism01 10-02-2004 08:21 AM

I believe Fedora comes with YUM as std, in which case you could try
yum install rpm
as root .

unixmad 10-02-2004 09:59 AM

heres an update, ..... I think i already tried yum however I shall try again...... I remembered that I have an unused ext3 partion so I have done a fersh install on the ext3 partition this way I will have an original fedora core install with rpm, so now i have the following layout

system without rpm ------
/dev/hda1 /boot
/dev/hda2 /

end system without rpm -------

new system with rpm

/dev/hda5 /boot
/dev/hda6 /

new system with rpm end ------

how would i go about installing rpm on the system without rpm FROM the system with rpm, Ive tried prefix= but its says package is not rellocatable, Ive succesfully mounted both the old & new system during linux rescue but im unsure what to do next as I though I copied the relevant files but im getting error ehilr loading shared libraries librpm-4.3.so cannot open shared object file no such file or directroy?

David

unixmad 10-02-2004 11:04 AM

I managed to get rpm installed by doing the following:

mkdir /mnt/rescue
mount -o loop /mnt/cdrom/Fedora/base/stage2.img /mnt/rescue

cd /mnt/rescue/usr/bin/
then i did rpm which gave an error about shared libaries. Finally to get rid of shared librarys error I added /mnt/rescue/usr/lib64 and /mnt/rescue/usr/lib to /etc/ld.so.conf and ran ldconfig ......

The above got rid of the shared libraries error but I was getting a error about rpmrc being unreadable so I copied /mnt/rescue/usr/lib/rpm into /usr/lib/rpm and rpm of the fedora disk worked , I them did rpm -Uvh rpm-4.X.rpm and rpm is now installed again.

What I did was a variation of what was discussed on this site
http://www.redhat.com/archives/fedor.../msg04774.html

Just thought I would put this down in a forum just in case someone else completely destroys there rpm.

The only thing is I installed to root partitions e.g linux installed twice on different parts of the same drive now grub is hay wire lol. If I figured that solution sooner I would never have had to install linux twice

unixmad 10-02-2004 12:06 PM

And that grub fixed so im back in business thanks for your input ..... now back to my original problem regarding apt-get which is how I managed to delete rpm in the first place hehe ..... but im putting that in another thread because it is a different subject

David


All times are GMT -5. The time now is 05:22 AM.