- I hosed my rpm database
- Posted by Z. M. Wu on December 2nd, 2003
While upgrading glibc glibc-common and glibc-devel
to the latest versions on a redhat 8.0 server
rpm -Uvvh got stuck near the end. I had
to stop this stuckage by doing kill -9
After that I check "rpm -qa|grep glibc"
and find that old packages are still there.
Worse rpm stop responding to root usage.
What I mean is that rpm got stuck whenever
root uses it. Even rpm -qa got stuck
for root. Funny that rpm -qa works for
a regular user.
When I do rpm -qavv as root I find that it got
stuck trying to read /var/lib/rpm/Packages
I believed db library is somewhat
out of wack with Packages db library
only for root user.
Anyway I moved /var/lib/rpm/Packages
to somewhere else and I was able to install glibc using
--nodeps option.
But when I do rpm -qa I get a very
short list of only packages since that move
Can anyone suggest something?
Thanks in advance
Mr Zong Ming Wu
- Posted by baskitcaise on December 2nd, 2003
Z. M. Wu wrote:
<<--snip-->>
does "rpm --rebuilddb" work in rebuilding the db?
--
Mark
Twixt hill and high water.
N.Wales, UK.
Email is spam trap try baskitcaise at gmx dot co dot uk
- Posted by mjt on December 2nd, 2003
On Tue, 02 Dec 2003 04:46:20 GMT, "Z. M. Wu" <noemail@none.com1> wrote:
.... had you: "man rpm", you'd see an option to rpm
to rebuild the database, let's see:
)
~ man rpm,
.... use the '/' key, search for "rebuild"
.... yep, there it is:
REBUILD DATABASE OPTIONS
The general form of an rpm rebuild database command is
rpm {--initdb|--rebuilddb} [-v] [--dbpath DIRECTORY] [--root DIRECTORY]
Use --initdb to create a new database, use --rebuilddb to
rebuild the database indices from the installed package headers.
..
--
/// Michael J. Tobler: motorcyclist, surfer, skydiver, \\\
\\\ and author: "Inside Linux", "C++ HowTo", "C++ Unleashed" ///
- Posted by Z. M. Wu on December 2nd, 2003
Had you read what I wrote you would have
seen that rpm stopped working for root.
If I had to spell it out for you that
means rpm --rebuilddb does not work
as well for root. And yes I read the man
pages.
Of course after I wiped out Packages file
rpm --rebuilddb works but it is useless
and does not do anything.
mjt wrote:
- Posted by David on December 2nd, 2003
Z. M. Wu wrote:
Not a fix but did you switch to "runlevel 1" before trying to
upgrade glibc ?
--
Confucius: He who play in root, eventually kill tree.
Registered with The Linux Counter. http://counter.li.org/
Slackware 9.1.0 Kernel 2.4.23 SMP i686 (GCC) 3.3.2
Uptime: 3 days, 2 min, 1 user, load average: 0.02, 0.05, 0.08
- Posted by Matt Ng on December 2nd, 2003
On Tue, 02 Dec 2003 20:25:02 +0000, Z. M. Wu wrote:
How about deleting the __db.00* files under /var/lib/rpm ?
- Posted by Llanzlan Klazmon The 15th on December 2nd, 2003
"Z. M. Wu" <noemail@none.com1> wrote in news:wOUyb.14831$n4.8284
@nwrddc01.gnilink.net:
You took a backup before starting the upgrade right?
Llanzlan.
- Posted by Z. M. Wu on December 2nd, 2003
switching runlevel was not an option because I was
logged in via ssh.
I did test this upgrade on one machine while
I had the console and it went smoothly
without switching the runlevel.
I then did the upgrades to other servers
via ssh and all -- except one -- went smoothly.
BTW even though rpm database is gone this server
is still up and running and doing its job well.
Of course there were some glitches like
having to restart a number of daemons.
David wrote:
- Posted by Leon. on December 2nd, 2003
"Z. M. Wu" <noemail@none.com1> wrote in message
news:yy6zb.44781$ZV6.2538@nwrddc02.gnilink.net...
Well that sucks doesnt it.
You can reinstall all the packages.
Actually you can install the database for all the rpm's on your cd's , if
you are sure you installed them. theres a rpm command to install the
database only.
You can just install all the updates as they become available - the
automatic updates wont work,
you have to download them manually. when they say that the require blah,
you may need to install the rpm info for blah from the cd... and then the
update will install.
To upgrade to a new version of the OS, you can just do it manually from the
command line.
rpm --upgrade redhat-blah-rpm
rpm --upgrade glibc .... etc etc
Or
rpm --upgrade *.rpm