LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 05-26-2003, 05:12 PM   #1
pilot1
Member
 
Registered: Jun 2002
Location: USA
Distribution: Gentoo, Fedora Core
Posts: 408

Rep: Reputation: 30
Angry Help fixing glibc..


I recently was updating everything with up2date and I noticed that none of the glibc packages would update, but everything else would. So I went to RH's website and downloaded the glibc version 2.3.2-27.9 rpms, and tried to install them.

Somewhere in the installation of glibc-2.3.2-27.9.i386.rpm I effectively destroyed glibc, and now whenever I try to run most programs I get the error "Segmentation Fault".
I tried downloading a bzipped archive, but when I tried to untar it I got the same error, I had the same problem with a tarball.

Does anyone know how I can fix my system without having to reformat the hard drive?
Thanks!

This is the RH 9 computer, by the way.
 
Old 05-26-2003, 05:23 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
You could try loading up the RH rescue cd and try the rpm operation from there. Just don't forget to point --root to the disk your rootsystem is mounted on.
 
Old 05-26-2003, 05:25 PM   #3
pilot1
Member
 
Registered: Jun 2002
Location: USA
Distribution: Gentoo, Fedora Core
Posts: 408

Original Poster
Rep: Reputation: 30
Well, I don't exactly have the CDs.. I suppose I could download and burn them, though.

But will that work if it didn't work with RPMs before?
And which CD is the rescue CD? The first one? Cause I don't want to have to download all three of the ISOs if I don't need to.

Also, what do you mean by pointing -root and how would I do it?
My root FS is on /dev/hdb2 if that helps.

Last edited by pilot1; 05-26-2003 at 05:30 PM.
 
Old 05-26-2003, 07:34 PM   #4
Korff
Member
 
Registered: May 2003
Location: Central Florida
Distribution: Gentoo
Posts: 103

Rep: Reputation: 15
Rescue program is on disc 1.

Hint: I found that the fastest iso download site is an .edu mirror of a college in or near your city.
 
Old 05-26-2003, 10:03 PM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
But will that work if it didn't work with RPMs before?
Yes. Unless the rpm database is b0rken, it will work.
If nothing works, as a temporary fix, you could even copy the libraries from the cd to your system, run ldconfig and then see if it would work.

Also, what do you mean by pointing -root and how would I do it?
My root FS is on /dev/hdb2 if that helps.

"--root" is an option of rpm. When you boot the rescue cd Red hat will automagically mount your partitions in /mnt. Since the rpm database is in /var/lib/rpm on disk /dev/hdb2, you would point rpm to look there for information: "rpm --root /mnt/hdb2 <args>".
 
Old 05-27-2003, 06:10 AM   #6
pilot1
Member
 
Registered: Jun 2002
Location: USA
Distribution: Gentoo, Fedora Core
Posts: 408

Original Poster
Rep: Reputation: 30
I get alot of errors when I try to run rpm, then it exits.
The errors are "rpmdb: unable to join the enviroment" and then "cannot open Packages index with db3 - resource temporarily unavailable"

Any idea on how I can get it to work?
I tried running it without the root command, but then it tries to add files to the CDrom, which doesn't work.

Also, i'm running a RH 8 CD because I couldn't get back into my computer to burn the 9 CD, and it won't start now.

Last edited by pilot1; 05-27-2003 at 06:29 AM.
 
Old 05-27-2003, 06:35 AM   #7
pilot1
Member
 
Registered: Jun 2002
Location: USA
Distribution: Gentoo, Fedora Core
Posts: 408

Original Poster
Rep: Reputation: 30
When I try to manually launch rpmdb it gives me the error "Cannot find librpm-4.2.so", when I type rpm --version it tells me that the version of RPM that is running is 4.1.

I see that librpm-4.2.so is in /mnt/sysimage/usr/lib but rpmdb is looking in /usr/lib which contains an older version of librpm.
Any ideas?

Last edited by pilot1; 05-27-2003 at 06:40 AM.
 
Old 05-27-2003, 07:40 AM   #8
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Hmm. Tricky problem. Rpmdb is the version running from the CD, so natually it would look at /usr/lib, because /mnt/sysimage/* doesn't exist until it's mounted and even then it's another version.

If you want to pursue installation tru rpm: what commandline did you run rpm with? Give us all the flags. Mount a floppy and copy the errors over and post 'em.

The other way would be running rpm2cpio. This WILL break the rpmdb, so once the system is up you will have to FORCE install the rpm again to sync it with the real situation. Also I make no guarantees it will work (but I guess it will).
Copy rpm and move to temp dir first, then run cpio on the glibc-2.3.2-27.9.i386.rpm: "rpm2cpio glibc-2.3.2-27.9.i386.rpm > glibc-2.3.2-27.9.i386.cpio" and extract the cpio archive: "cpio --make-directories --force-local --extract --no-absolute-filenames --verbose -F glibc-2.3.2-27.9.i386.cpio"
Now you got a tree you can copy over to /mnt/sysimage.
For Linux to recognize the files you need to run ldconfig.
First make a copy of the libs listed so you can verify it:
"ldconfig -r /mnt/sysimage -p 2>&1 > ldcache.0"
Now rebuild the cache:
"ldconfig -r /mnt/sysimage -v".
Verify: "ldconfig -r /mnt/sysimage -p 2>&1 > ldcache.1" then "diff -urN ldcache.0 ldcache.1". Glibc libs' version should have changed.
The system should be bootable now.

There are other ways to temporarily fix the situation but that should be reserved as a last effort attempt.
 
Old 05-27-2003, 08:08 AM   #9
pilot1
Member
 
Registered: Jun 2002
Location: USA
Distribution: Gentoo, Fedora Core
Posts: 408

Original Poster
Rep: Reputation: 30
It just hit me that the RH 9 ISO may have finished downloading before I was forced to reboot the computer.. it did and I just rebooted into rescue mode with that CD.

Now I can install RPMs, and I installed glibc, glibc-common, glibc-devel, glibc-profile, glibc-utils, and nscd. Glibc-debug gave a servelet error when I tried to install it. (Those were the RPMs that I had originally tried to install, when I messed up glibc)
The RPMs seemed to install, but at the end I always got the error "rpmdb: /var/lib/rpm/Triggername no such file or directory"


Hopefully those were the right RPMs to install, what do I do next?

I tried running ldconfig using the directions you gave above, and the two files that I compared with diff were exactly the same.

Should I try running rpm2cpio? I don't mind breaking the database if that works, but if there's a better way to do it let me know.

Oh, and the command I used to install the RPMs was "rpm -r /mnt/sysimage/ -ivh glibc.rpm.name" and in some cases I had to use --force to force it.

Last edited by pilot1; 05-27-2003 at 08:20 AM.
 
Old 05-27-2003, 08:28 AM   #10
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Hopefully those were the right RPMs to install, what do I do next?
Check if the box will boot up?

I tried running ldconfig using the directions you gave above, and the two files that I compared with diff were exactly the same. Should I try running rpm2cpio?
I described two methods of trying to install stuff. I you installed using rpm then running ldconfig or rpm2cpio is not necessary.

I'd say at this point you better check if the box will boot up.

The missing file Triggername could mean the rpm database is slightly b0rken. See if you can repair it, then query for all rpm's/verify all rpms. If that works your rpm database seems OK.
 
Old 05-27-2003, 08:35 AM   #11
pilot1
Member
 
Registered: Jun 2002
Location: USA
Distribution: Gentoo, Fedora Core
Posts: 408

Original Poster
Rep: Reputation: 30
It won't boot up, I tried that but forgot to mention it.
It says something about the run level spawning (I think that was the word it used) too quickly, and it says it disabled them for 5 minutes.

How would I repair the RPM database?

Also, when I do a query it says the glibc RPMs aren't installed. BUT if I query a RPM that I know is installed it says the RPM isn't installed, so it's probably just something with the database.

I also tried cpio, but when I got to the second step it didn't work.
If I type "cpio -- make-directories --force-local --extract --no-absolute-filenames --verbose -F glibc-2.3.2-27.9.i386.cpio" it doesn't do anything, and if I erase the space between -- and make-directores it gives me "-- - invalid option"

Last edited by pilot1; 05-27-2003 at 09:11 AM.
 
Old 05-27-2003, 09:30 AM   #12
pilot1
Member
 
Registered: Jun 2002
Location: USA
Distribution: Gentoo, Fedora Core
Posts: 408

Original Poster
Rep: Reputation: 30
I found another copy of cpio on the system, and used that to create a directory tree in /home/andrew/tmp/, however when I tried "mv * /mnt/sysimage" it gave me errors saying it couldn't overwrite the directories in /mnt/sysimage/.
If I try "cp -R * /mnt/sysimage/" it give the error "Unable to link: file exists. <filename here>"

[Edit] It seems that the cp command on the rescue CD isn't the normal one, I used the normal one and it copied fine. Then I ran the ldconfig commands like you said to. The only difference diff found in the two files were things with libc6 in them. I rebooted anyway, and it still didn't work.
Maybe I need to install the version of glibc that came with RH9 instead of the new version? The old version is glibc-2.3.2-11.9, but I can't find any RPMs to install it with, and I don't have a way (besides floppys) of transferring it to the other computer.
What should I do?

Last edited by pilot1; 05-27-2003 at 09:39 AM.
 
Old 05-27-2003, 10:00 AM   #13
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
First let's try to get into the system.
Can you boot into runlevel 1 by adding "single init=/bin/sh" on the LILO commandline (I don't use GRUB, search LQ)?
 
Old 05-27-2003, 10:14 AM   #14
pilot1
Member
 
Registered: Jun 2002
Location: USA
Distribution: Gentoo, Fedora Core
Posts: 408

Original Poster
Rep: Reputation: 30
Well, I have GRUB.. i'll do a search to find the command.
I tried setting up LILO, but when I ran "lilo -t" it gave an error because a file in /boot didn't exist because of the rescue disc.

GRUB doesn't have a command to do that.. any idea on how I can install LILO when I have the files in /mnt/sysimage/boot instead of /boot?

Last edited by pilot1; 05-27-2003 at 12:14 PM.
 
Old 05-27-2003, 12:49 PM   #15
pilot1
Member
 
Registered: Jun 2002
Location: USA
Distribution: Gentoo, Fedora Core
Posts: 408

Original Poster
Rep: Reputation: 30
I got LILO installed using symbolic links.
Now where do I do the single init thing? I tried control+x to get into text mode, but it wouldn't accept the single init command there.
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
problem installing glibc-2.3.2-4.80.i686, glibc-common-2.3.2-4.80.8.i386.rpm martianpackets Red Hat 8 05-01-2009 03:22 PM
Compiling glibc-2.3.5 or glibc 2.3.5-r1 on Gentoo fails ghrellin Linux - Software 2 07-19-2005 01:01 AM
Replacing glibc using linuxthreads for glibc using nptl (native positx thread library CestusGW Linux From Scratch 4 01-20-2005 07:26 AM
ncsd, glibc, and glibc-common conflicts during LAMP install beaker911 Linux - Software 0 12-30-2004 02:31 PM
glibc 2.3.2 => glibc 2.3.3 causes bash & syslog issues natetheros Red Hat 1 09-27-2004 01:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:13 AM.

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
Open Source Consulting | Domain Registration