FedoraThis forum is for the discussion of the Fedora Project.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I did an apt-get upgrade and it removed rpm and apt oops. Is there any way I can install rpm without having to compile it? I am using 2.6.12-1.1381_FC3smp.
I don't unserstand how to install it on the mounted partition? is --dbdir and option for apt ? sorry for the stupid question, but as you can see I did delete rpm to begin with.
Now I don't know if by booting you loose access to the RPMS dir on the disk, so maybe you should first copy the rpm.*.rpm rpm's to your partition (say /tmp). Now if you boot your installer CDR/DVD in rescue mode it will give you access to the binaries on the CDR/DVD, amongst which is rpm. Rescue mode should mount your partitions, the --dbpath parameter tells rpm on which mounted(!) partition the rpm database resides. So:
0. Note on which partition /var is: "grep /var /etc/fstab",
1. Mount the rescue CDR/DVD and copy the rpm's to your /tmp: "find /mnt/cdrom -type f -name "rpm-\*.rpm"|xargs -iF cp 'F' /tmp",
2. Boot your installer CDR/DVD in rescue mode and find out where the /tmp and /var partitions are mounted: "mount",
3. Test installing the rpm's: "rpm --test --force -i --dbpath /mnt/varpartitionname/var/lib/rpm /mnt/tmppartitionname/*.rpm". If the test went w/o errors remove the "--test" argument and repeat to install.
If any of this causes errors you could (if you have access to a writable partition or can mount a floppy) append this command to get output to file: "2>&1|tee -a /mnt/tmppartitionname/error.log". Else write it down. If you post errors, please make sure you post *exact* errors, not aproximations.
okay i mounted it from another fc install and got this error.....
root@berry mnt]# rpm --test --force -i --dbpath /mnt/data/var/lib/rpm /mnt/data/tmp/librpm4.4-4.4.2-15.1_58.rhfc3.at.i386.rpm
rpmdb: Program version 4.2 doesn't match environment version
error: db4 error(22) from dbenv->open: Invalid argument
error: cannot open Packages index using db3 - Invalid argument (22)
error: cannot open Packages database in /mnt/data/var/lib/rpm
warning: /mnt/data/tmp/librpm4.4-4.4.2-15.1_58.rhfc3.at.i386.rpm: V3 DSA signature: NOKEY, key ID 66534c2b
rpmdb: Program version 4.2 doesn't match environment version
error: db4 error(22) from dbenv->open: Invalid argument
error: cannot open Packages database in /mnt/data/var/lib/rpm
I deleted the db and forced packeges and now I get a Segmentation fault when I run an rpm command.
Am I doomed to perform an upgrade?
I deleted the db
From the errors you posted it needed either "rm -rf /var/lib/rpm/__db*" or --rebuilddb to work. Anyway. None of that matters anymore. FYI, the database holds all the information about packages you installed. Needless to say deleting the database ain't good and nobody sane would ever give you that as advice.
and forced packeges and now I get a Segmentation fault when I run an rpm command
Since you chose to wander off and fsck it up all by yourself (I mean, I didn't tell you to delete the database, right?) I'm wondering what good it possibly would do to give you any more advice?..
OK. Here's one scenario. YMMV(VM).
Backup files, rpm database of what's left,
Boot your distro's rescue DVD that comes with this release and install right versions of rpm, popt, and db(3 or4),
Do an --initdb to another --dbpath than /var/lib/rpm,
Now if you still have a (cronjob generated) /var/log/rpmpkgs you could be able to get the database going by installing ("importing", more likely) packages using --justdb --noscripts but to what extent I don't know. That's why Your Mileage May Vary (Very Much).
Before you do this however you might want to think about investing more time in repairing this without any guarantees or making a backup, nuking the install and starting afresh.
I didn't remove the db I renamed it so I still have the original. I noticed over the weekend that I forgot the --root option, once I renamed the backups to the directory it worked fine. Thank you for your help. That is what I get for trying to repair it from work during a lunch break.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.