Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

INFO: repairing "cannot open depends index using db1 - Invalid argument (22)"

0 views
Skip to first unread message

ERA

unread,
Dec 11, 2001, 3:51:53 AM12/11/01
to
Hi all,

I am sure I posted a message about this but apparently my USENET host
is losing posts again. Hopefully this one will go through.

Just last night I had the "cannot open depends index using db1 -
Invalid argument (22)" error with a "segmentation fault" on anything
I tried to do with rpm 4.0.2 after updating to kernel 2.2.19-6.2.12
recently. Apparently one of the kernel packages did something naughty
to the rpm database.

Anyway, I was stumped. I left the client site determined to figure
this out *soon* as I *had* to get 'secureweb' updated to fix the
security hole exposing files. Here is what I had to do to the best of
my recollection:

*> Login as root.
*> Get updated packages for rpm 4.0.3 from ftp.rpm.org
a. popt-1.6.3-6x.i386.rpm
b. rpm-4.0.3-6x.i386.rpm
[the files I got are in the '/pub/rpm/dist' dir]
*> Use 'rpm2cpio' to create a cpio archive of each.
a. cd /where/you/downloaded/the/rpms (if not already there)
b. rpm2cpio < popt-1.6.3-6x.i386.rpm > /root/popt.cpio
c. rpm2cpio < rpm-4.0.3-6x.i386.rpm > /root/rpm.cpio
*> Use 'cpio' to extract the archives to disk.
a. cd / <- *must* be in base directory!
b. cpio --make-directories -F /root/popt.cpio -i
c. cpio --make-directories -F /root/rpm.cpio -i
d. rpm --version <- to check that 4.0.3 is there
*> Use the newly installed rpm 4.0.3 to rebuild the database.
a. cd <- return to /root for safety
b. rpm --rebuilddb
*> Get rid of the old 4.0.2 version.
a. rpm -e --nodeps rpm-4.0.2-6x
[This removed rpm from your system so we repeat steps here]
*> Use 'cpio' to extract the archives to disk ... again.
a. cd / <- *must* be in base directory!
b. cpio --make-directories -F /root/popt.cpio -i
c. cpio --make-directories -F /root/rpm.cpio -i
d. rpm --version <- to check that 4.0.3 is there
*> Then use the extracted rpm to install popt* and itself.
a. cd /where/you/downloaded/the/rpms
b. rpm -Uvh popt*rpm
c. rpm -Uvh rpm*rpm
d. rpm --rebuilddb <- once more for safety
*> Remove the *.cpio files from /root if desired.
a. cd <- return to /root for safety
b. rm *.cpio
*> Manage the rpm database as if nothing was ever wrong. :-)

Of course it doesn't seem like much to look at now but I spent about
5 hours tracking down all the information I needed to do the above. I
hope this helps someone. It worked for me but Y[MK]MV.

DISCLAIMER: I typed the above from memory with some very sketchy
hand written notes and I've been up for almost 20 hours now. Use at
your own risk. :-)

Gene <ge...@eracc.hypermart.net>
Caldera Authorized Partner - OpenServer 5+, UnixWare 7+ & OpenLinux
--
. Owner and C.E.O. - ERA Computer Consulting - Jackson, TN USA .
. OS/2, UnixWare, OpenServer & Linux Business Computing Solutions .
. Please visit our www pages at http://eracc.hypermart.net/ .
We run IBM OS/2 v.4.00, Revision 9.036
Sysinfo: 46 Processes, 191 Threads, uptime is 13d 4h 59m 0s 360ms

0 new messages