rpm --initdb error: cannot open Packages index using db3
# rpm --initdb
error: cannot open Packages index using db3 - No such file or directory (2) # rpm --rebuilddb error: cannot open Packages index How to fix this problem? |
The first thing to do is to check what files exist in your rpm data base. Look in the /var/lib/rpm directory. You should have about 15 or 20 files in that directory, one of them named Packages.
--------------- Steve Stites |
Quote:
# make ... error: cannot open Providename index using db3 - No such file or directory (2) error: cannot open Name index using db3 - No such file or directory (2) error: cannot open Basenames index using db3 - No such file or directory (2) error: cannot open Conflictname index using db3 - No such file or directory (2) error: failed build dependencies: perl is needed by app_server-4.9.9-9 openssl-devel is needed by app_server-4.9.9-9 sharutils is needed by app_server-4.9.9-9 tcp_wrappers is needed by app_server-4.9.9-9 /bin/login is needed by app_server-4.9.9-9 glibc-devel is needed by app_server-4.9.9-9 pam is needed by app_server-4.9.9-9 make: *** [linux_rpm_server] Error 1 |
Quote:
------------------- Steve Stites |
Quote:
rpm --initdb |
Quote:
|
Quote:
# rpm -q perl openssl-devel tcp_wrappers glibc-devel pam error: cannot open Name index using db3 - No such file or directory (2) package perl is not installed package openssl-devel is not installed package tcp_wrappers is not installed package glibc-devel is not installed package pam is not installed However, perl is installed but rpm cannot see it. |
First of all you shouldn't be building RPMs as root. It's not necessary, any unprivileged user account should do. Because of your "mkdir /var/lib/rpm; rpm --initdb" creating a new RPM database structure, the RPMDB is empty. Where on earth did you get those instructions from? Now if you have the /etc/cron\..*/rpm cronjob (the one that does "/bin/rpm -qa --qf '%{name}-%{version}-%{release}.%{arch}.rpm\n' 2>&1 | /bin/sort > /var/log/rpmpkgs"), then there is a possibility to kind of restore the RPMDB in a semi-automatic way. You need to download the installed packages (like with "yum --download-only") and then install them with 'rpm' using "--justdb --noscripts". This could require the use of "--force". I'd like to understand what lead to this. Can you tell us what commands you executed that caused this problem where you had to rebuild the RPMDB?
|
Quote:
Please explain more about: /etc/cron\..*/rpm cronjob (the one that does "/bin/rpm -qa --qf '%{name}-%{version}-%{release}.%{arch}.rpm\n' 2>&1 | /bin/sort > /var/log/rpmpkgs") I am just one of the users using that computer, I do not know which commands caused this problem. |
The default Fedora/RHEL/CentOS/.* /etc/cron.daily/rpm cronjob lists (command as shown) installed packages and dumps them in /var/log/rpmpkgs. Ergo, if you do not have a complete RPMDB but you have /var/log/rpmpkgs, then you can find most packages on your install CDs or download them from the official repos.
|
All times are GMT -5. The time now is 01:07 AM. |