LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-30-2007, 03:06 AM   #1
mrtheduke
LQ Newbie
 
Registered: Mar 2007
Distribution: 64 bit Fedora Core 6
Posts: 8

Rep: Reputation: 0
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
 
Old 03-30-2007, 09:13 AM   #2
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
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.
 
Old 09-14-2007, 01:39 AM   #3
dburgess
LQ Newbie
 
Registered: Sep 2007
Posts: 2

Rep: Reputation: Disabled
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
 
Old 09-14-2007, 06:43 AM   #4
blackhole54
Senior Member
 
Registered: Mar 2006
Posts: 1,896

Rep: Reputation: 61
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.
 
Old 09-15-2007, 01:01 AM   #5
dburgess
LQ Newbie
 
Registered: Sep 2007
Posts: 2

Rep: Reputation: Disabled
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
 
Old 09-15-2007, 07:28 AM   #6
AwesomeMachine
Senior Member
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 3,013

Rep: Reputation: 518Reputation: 518Reputation: 518Reputation: 518Reputation: 518Reputation: 518
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.
 
Old 02-14-2008, 09:50 AM   #7
sawadeekap2233
LQ Newbie
 
Registered: Nov 2006
Location: Chernokulaikos
Distribution: Fedora3 Colinux win98
Posts: 22

Rep: Reputation: 15
Unhappy rebuilddb -cant work in my system...

Quote:
Originally Posted by dburgess View Post
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
 
Old 02-14-2008, 10:10 AM   #8
Drakeo
Senior Member
 
Registered: Jan 2008
Location: Urbana IL
Distribution: Slackware, Slacko,
Posts: 3,153
Blog Entries: 3

Rep: Reputation: 339Reputation: 339Reputation: 339Reputation: 339
thank you for the Update dburgess you knowlege and feed back is wonderful.
 
  


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
yum remove rpm --> how to reinstall rpm npubudu Linux - Software 5 01-25-2007 08:08 AM
yum/rpm incorrectly show missing dependencies jlarmour Linux - Software 3 09-29-2006 02:51 AM
Why -bash: rpm: command not found??? Also an rpm/yum Q? vbtalent Debian 6 01-23-2006 04:55 PM
yum version yum-2.0.5-0.9.2.legacy.noarch.rpm master Red Hat 6 05-13-2005 03:03 PM
last ditch effort at debian race Debian 11 03-22-2004 10:20 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:54 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration