LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Last ditch effort - Missing RPM and YUM (https://www.linuxquestions.org/questions/linux-newbie-8/last-ditch-effort-missing-rpm-and-yum-541838/)

mrtheduke 03-30-2007 03:06 AM

Last ditch effort - Missing RPM and YUM
 
Whilst doing an update with yum, I had a powercut. When the power came back on and I tried running Yum update again I got a bunch of conflict errors. I read on another thread that removing the packages that had caused the conflicts should allow you to run the update successfully. The package which was causing the problem was elfutils so I removed it (and very stupidly, didn't read the list of other packages it was going to remove along with it). Along with elfutils, it appears that both yum and RPM have been removed, Doh!! I'm guessing that I'm probably going to have to do a re-install, but I thought I'd check first if there's a way to get these packages re-installed manually so I don't have to do that? Any ideas?

P.s. Please feel free to laugh at my stupidity :D

jay73 03-30-2007 09:13 AM

Hmm, I don't know, I think you would need rpm to install anything at all - especially if you do it manually. Since rpm is one of the packages that was lost, you may be out of luck. And you could set up the dvd as a repository but then that involves yum... Maybe compiling rpm from source would help but that's only a wild guess, really.

dburgess 09-14-2007 01:39 AM

I have the same problem - no rpm.
I figure if I can get RPM back then I can get everything else.
My second problem is that this is on a hosted server - any
suggestions welcom

blackhole54 09-14-2007 06:43 AM

I realize that this is way to late for mrtheduke, and sadly, I don't think it will help dburgess. But I am posting it anyway for people that stumble onto this thread in the future.

If you can find a rescue disk or live CD with rpm on it (KNOPPIX has both rpm and dpkg) and you can download or otherwise obtain the rpm for the rpm package, then you should be able to fix your system using the --root option for rpm. At least according the author of Knoppix Hacks, Kyle Rankin; while I have used --root for fixing other packages, I have not done it for the rpm package itself. It would be a good idea to backup anything valuable first. (You can also do a dry run first using the --test option.)

Assuming you have mounted your main partition on /dev/sda1 (adjust the following command if using a different mount point), and if the rpm to be installed is in your current directory, as root type:

Code:

rpm --root /mnt/sda1 -i name-of-rpm.rpm
If the rpm is elsewhere, say on the rescue disk you are using, just add the correct path before the filename.

For Debian like systems, dpkg also has a --root option that is used in the same way.

dburgess 09-15-2007 01:01 AM

well i solved my problem, I will relate the story just in case it helps someone else.

step 1) copied some files from an FC3 server namely /bin/rpm, /usr/lib/librpm*, /usr/lib/rpm/*

step 2) installed sqlite from http://www.sqlite.org/

step 3)
# rm -rf /var/lib/rpm/__db*
# mkdir -m 0755 /var/lock/rpm
# rpm --rebuilddb

step 4...) rpm -ivh rpm... #lots of stuff and their dependencies

namely

yum
rpm
up2date
rpm-build
rpm-libs
rpm-devel
sqlite-devel
system-config-network-tui
rpm-python
sqlite
python-sqlite

may this save someones sanity one day

AwesomeMachine 09-15-2007 07:28 AM

Use a package manager like synaptic. You can also always install from source. You don't actually have to use the fedora package. If you need individual packages you can point your browser to a fedora mirror, like 'ftp://mirrors.kernel.org/pub/fedora , navigate to your version's directory, and manually download what you want by clicking on the filename. RPM needs to install without RPM, or no one could ever install it the first time, so it might be a source file.

You can also use 'apt-get install <package>' to install packages with fedora. That is usually installed by default. It will check dependencies for you. I believe synaptic would probably be the easiest, though.

sawadeekap2233 02-14-2008 09:50 AM

rebuilddb -cant work in my system...
 
Quote:

Originally Posted by dburgess (Post 2892375)
well i solved my problem, I will relate the story just in case it helps someone else.

step 1) copied some files from an FC3 server namely /bin/rpm, /usr/lib/librpm*, /usr/lib/rpm/* <<how to get this??

step 2) installed sqlite from http://www.sqlite.org/

step 3)
# rm -rf /var/lib/rpm/__db*
# mkdir -m 0755 /var/lock/rpm
# rpm --rebuilddb

step 4...) rpm -ivh rpm... #lots of stuff and their dependencies <<
is the command exactly like this? the 'rpm' -issit from step 1?

namely

yum
rpm
up2date
rpm-build
rpm-libs
rpm-devel
sqlite-devel
system-config-network-tui
rpm-python
sqlite
python-sqlite

may this save someones sanity one day

>> i hv the same problem, not being able to rebuildb my rpm DB,
even tho i tried :rpm --rebuilddb ,, several times. cos when I issue:rpm -qa ,, i get nothing to see. and since I dun hv my rpm DB, i cant use yum to update any rpms...pls help. I m using FC3

Drakeo 02-14-2008 10:10 AM

thank you for the Update dburgess you knowlege and feed back is wonderful.


All times are GMT -5. The time now is 11:26 PM.