LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 05-05-2006, 07:39 PM   #1
Mad Scientist
Member
 
Registered: May 2003
Posts: 167

Rep: Reputation: 30
Hosed my rpm installation (i.e. "rpm -e rpm")


I just tried to upgrade my Fedora installation from Core 3 to Core 4. I used a technique I have used successfully in the past, namely

Code:
apt-get dist-upgrade
Before I executed that command, I updated my source.list.d/*.list files to use the Fedora Core 4 repositories. Everything went according to plan, but the rpm, apt-get, and yum packages failed to install.

Now I have a bootable Fedora Core 4 installation with no installed rpm tool. When I try to use rpm, I get

Code:
rpm: command not found
I followed the instructions I found at http://www.redhat.com/archives/rpm-l.../msg00143.html , but I had no success. Specifically, I got

Code:
[root@machine ~]# rpm -ivh --nodeps rpm-4.4.1-21.i386.rpm 
Preparing...                ########################################### [100%]

You have (unsupported)
        /var/lib/rpm/packages.rpm       db1 format installed package headers
Please install rpm-4.0.4 first, and do
        rpm --rebuilddb
to convert your database from db1 to db3 format.

error: execution of %pre scriptlet from rpm-4.4.1-21 failed, exit status 1
error: skipping rpm-4.4.1-21 install, %pre scriptlet failed rc 2
[root@machine ~]# rpm --rebuilddb
/usr/lib/rpm/rpmdb: error while loading shared libraries: libdb-3.1.so: cannot open shared object file: No such file or directory
Does anyone have any idea how I can get myself out of this jam?

Thanks for your time.
 
Old 05-05-2006, 08:05 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: 64
What you are doing seems odd. Looks like rpm is there since root can run the command.

As root run the command ' rpm -qa | grep rpm '. And post the output.

Brian1
 
Old 05-06-2006, 11:56 AM   #3
Mad Scientist
Member
 
Registered: May 2003
Posts: 167

Original Poster
Rep: Reputation: 30
Well, rpm is there in the sense that I followed the instructions in that link I gave in my original post and downloaded and unpacked a binary version of RPM I found on the web. The RPM package itself is not installed.

Without having downloaded and unpacked this RPM binary, I always get

Code:
rpm: command not found
Having downloaded and unpacked the binary, I get

Code:
/usr/lib/rpm/rpmq: error while loading shared libraries: libdb-3.1.so: cannot open shared object file: No such file or directory
 
Old 05-07-2006, 10:16 AM   #4
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: 64
Never done this but how about pulling the rpm command off the Install CD.
I think if you boot with the FC4 Rescue CD you might be able to do it.
I would install the version that is on the CD.

Brian1
 
Old 05-08-2006, 12:38 PM   #5
Mad Scientist
Member
 
Registered: May 2003
Posts: 167

Original Poster
Rep: Reputation: 30
I was never able to get any help from the rescue CD, because I ran into the chicken and egg problem of how do I install the rpm package without having the rpm package installed?

I found another Fedora Core 5 machine and copied over all of the files in the rpm package one-by-one (using "rpm -q --filesbypkg rpm" to get the list). It seems like everything is more or less okay now. However, I cannot install the rpm package itself. I get

Code:
[root@machine ~]# rpm -ivh rpm-4.4.2-15.2.i386.rpm 
Preparing...                ########################################### [100%]

You have (unsupported)
        /var/lib/rpm/packages.rpm       db1 format installed package headers
Please install rpm-4.0.4 first, and do
        rpm --rebuilddb
to convert your database from db1 to db3 format.

error: %pre(rpm-4.4.2-15.2.i386) scriptlet failed, exit status 1
error:   install: %pre scriptlet failed (2), skipping rpm-4.4.2-15.2
I have run "rpm --rebuilddb" several times, and I'm just not having any luck getting the rpm package installed. I have un-installed and re-installed the gedit package successfully, though, so it looks like rpm is doing its job in that respect.

Do you have any idea why I am not allowed to install the rpm package itself?
 
Old 05-08-2006, 01:45 PM   #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: 57
You can try the following as root of course;

cd /var/lib
tar czvf /tmp/rpmdb.tar.gz rpm (just in case we need the database files)
cd rpm
rm /var/lib/rpm rm -f __db*

Now reboot the system and get the latest rpm packages for FC5 from;
http://download.fedora.redhat.com/pu...s/Fedora/RPMS/

(Note: your OP said from FC3 to FC4 but rpm-4.4.2-15.2.i386.rpm is for FC5)

popt-1.10.2-15.2.i386.rpm 06-Mar-2006 15:37 66K
rpm-4.4.2-15.2.i386.rpm 06-Mar-2006 15:37 647K
rpm-build-4.4.2-15.2.i386.rpm 06-Mar-2006 15:37 534K
rpm-devel-4.4.2-15.2.i386.rpm 06-Mar-2006 15:37 1.3M
rpm-libs-4.4.2-15.2.i386.rpm 06-Mar-2006 15:37 965K
rpm-python-4.4.2-15.2.i386.rpm 06-Mar-2006 15:37 51K

Place all the packages listed above in one location where they are the only rpm packages then as root type something like;

/usr/lib/rpm/rpmi -ivh *.rpm --force

Then rebuild the database; rpm --rebuilddb -vv
 
Old 03-02-2007, 12:42 AM   #7
fred909
LQ Newbie
 
Registered: Mar 2007
Posts: 1

Rep: Reputation: 0
Thumbs up

I just upgraded to FC5 from FC4 and had this same problem. Somehow I had installed an atrpms version of rpm, so the upgrade failed. Yum would not install the non-atrpms version of rpm (it was the same version... maybe I should have forced this install). So I did a 'yum remove rpm' (similar to an 'rpm -e rpm')... which did get rid of the atrpms rpm package , but left me with an un-upgradeable install.

I booted with disc 1 of FC3 and did a 'linux rescue'. With a working rpm from the cd I manually downloaded the rpms needed to reinstall from the redhat mirrors. I got stuck trying to go to the FC5 rpm version (which didn't work due to dependencies), the FC4 versions worked. I used 'rpm --root=/mnt/sysimage --oldversion -ivh rpm-xxxx.rpm (rpm-lib and more)' and it worked (--noscripts might be needed also if scripts are failing prior to instalation). I rebooted and 'yum -y update' worked.

fred

Last edited by fred909; 03-02-2007 at 12:44 AM.
 
  


Reply

Tags
fedora, rpm


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
counter part of "rpm -ivh --force kernel....rpm in slackware b0nd Slackware 2 01-28-2006 07:46 PM
Difference Between "Source RPM" "Static RPM" Mic Q SUSE / openSUSE 2 03-30-2005 06:51 PM
What's the difference between "rpm" and "*.noarch.rpm"? kpachopoulos Linux - Newbie 1 08-12-2004 11:03 AM
"Bad signatures"- unsuccessful rpm installation kpachopoulos Linux - Software 1 03-01-2004 10:15 AM
rpm error only says"rpm: relocation error: rpm: undefined symbol: poptAliasOptions" dlrsims Linux - Newbie 2 11-14-2003 09:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 06:34 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration