LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 05-19-2007, 12:16 AM   #1
keysorsoze
Member
 
Registered: Apr 2004
Location: Queens, NY
Distribution: Red Hat, Solaris
Posts: 295

Rep: Reputation: 30
Broke RPM?


Hello, I am back to seek some wise knowledge from some linux experts. I think I broke RPM and up2date! I removed a glibc package because I was getting errros and now up2date and rpm are broken.. The question is how to I fix this when I can no longer use rpm or up2date?? Any help would be appreciated. Thanks.

Here is a snapshot of the error

[root@NDR nagios-plugins-1.4.8]# rpm -e --allmatches --nodeps glibc-2.3.4-2.36
/sbin/ldconfig: /usr/lib/libcpqlsptransport.so.0 is not a symbolic link

error: %postun(glibc-2.3.4-2.36.x86_64) scriptlet failed, exit status 255
[root@NDR nagios-plugins-1.4.8]# rpm -qa | grep glibc
-bash: /bin/grep: /lib64/ld-linux-x86-64.so.2: bad ELF interpreter: No such file or directory
-bash: /bin/rpm: /lib64/ld-linux-x86-64.so.2: bad ELF interpreter: No such file or directory
[root@NDR nagios-plugins-1.4.8]# up2date glibc
-bash: /usr/sbin/up2date: /usr/bin/python: bad interpreter: No such file or directory
[root@NDR nagios-plugins-1.4.8]# cd
[root@NDR ~]# up2date
-bash: /usr/sbin/up2date: /usr/bin/python: bad interpreter: No such file or directory
 
Old 05-19-2007, 03:19 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 678Reputation: 678Reputation: 678Reputation: 678Reputation: 678Reputation: 678
You broke more than rpm. The glibc package contains the c library and the loader among other libraries that virtually everything uses. The fact that anything works may be due to some of these libraries already being loaded, or that some of them still actually exist.

Here is a list of contents of my glibc package:
Code:
/etc/bindresvport.blacklist
/etc/default/nss
/etc/ld.so.cache
/etc/ld.so.conf
/etc/nsswitch.conf
/etc/rpc
/lib64/ld-2.5.so
/lib64/ld-linux-x86-64.so.2
/lib64/libBrokenLocale-2.5.so
/lib64/libBrokenLocale.so.1
/lib64/libSegFault.so
/lib64/libanl-2.5.so
/lib64/libanl.so.1
/lib64/libc-2.5.so
/lib64/libc.so.6
/lib64/libcidn-2.5.so
/lib64/libcidn.so.1
/lib64/libcrypt-2.5.so
/lib64/libcrypt.so.1
/lib64/libdl-2.5.so
/lib64/libdl.so.2
/lib64/libm-2.5.so
/lib64/libm.so.6
/lib64/libmemusage.so
/lib64/libnsl-2.5.so
/lib64/libnsl.so.1
/lib64/libnss_compat-2.5.so
/lib64/libnss_compat.so.2
/lib64/libnss_dns-2.5.so
/lib64/libnss_dns.so.2
/lib64/libnss_files-2.5.so
/lib64/libnss_files.so.2
/lib64/libnss_hesiod-2.5.so
/lib64/libnss_hesiod.so.2
/lib64/libnss_nis-2.5.so
/lib64/libnss_nis.so.2
/lib64/libnss_nisplus-2.5.so
/lib64/libnss_nisplus.so.2
/lib64/libpcprofile.so
/lib64/libpthread-2.5.so
/lib64/libpthread.so.0
/lib64/libresolv-2.5.so
/lib64/libresolv.so.2
/lib64/librt-2.5.so
/lib64/librt.so.1
/lib64/libthread_db-1.0.so
/lib64/libthread_db.so.1
/lib64/libutil-2.5.so
/lib64/libutil.so.1
/sbin/ldconfig
/usr/bin/gencat
/usr/bin/getconf
/usr/bin/getent
/usr/bin/iconv
/usr/bin/ldd
/usr/bin/locale
/usr/bin/localedef
/usr/lib64/getconf
/usr/lib64/getconf/POSIX_V6_LP64_OFF64
/usr/lib64/pt_chown
/usr/sbin/glibc_post_upgrade
/usr/sbin/iconvconfig
/usr/sbin/rpcinfo
/usr/share/doc/packages/glibc
/usr/share/doc/packages/glibc/LICENSES
/usr/share/man/man1/getconf.1.gz
/usr/share/man/man1/getent.1.gz
/usr/share/man/man1/localedef.1.gz
/usr/share/man/man5/locale.alias.5.gz
/usr/share/man/man8/rpcinfo.8.gz
You may be able to recover some of them using lsof. If a file is still open by a running process, you may be able to locate it with lsof and copy it from the /proc/<pid>/fd/<fd#> link.

You may have to repair some of these system files offline. If your rescue disk has unrpm, then you can use it to copy the files to the system. An alternative is to use rpm2cpio & cpio to extract the contents of the glibc package.

Code:
> rpm2cpio /SUSE102/suse/x86_64/glibc-2.5-25.x86_64.rpm >glibc.cpio
> cpio -i -d  <glibc.cpio
> ls
etc  glibc.cpio  lib64  sbin  usr
For files that don't already exist, copy them manually. At least the ld loader and the libc libraries.
The you may be able to load & run the rpm program. You might try running "rpm -V glibc" to verify the package.

Last edited by jschiwal; 05-19-2007 at 03:36 AM.
 
Old 05-19-2007, 10:57 AM   #3
keysorsoze
Member
 
Registered: Apr 2004
Location: Queens, NY
Distribution: Red Hat, Solaris
Posts: 295

Original Poster
Rep: Reputation: 30
jschiwal

Thanks for the reply, Your right about that I broke the entire system. I have booted into the cdrom using linux rescue in redhat. However I don't quite understand how to access the cdrom to search for the specific glibc package. Would I need to mount each and every red hat cd and do a find until I find this specific glibc package?

Thanks for the help
 
Old 05-19-2007, 04:10 PM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 678Reputation: 678Reputation: 678Reputation: 678Reputation: 678Reputation: 678
It will probably be one of the first packages installed, so I bet it is on the first CD. It should be named glibc-<version>-<arch>.rpm.

Also, check if your rescue or install disk has a repair function. SuSE does and Fedora might. It may be able to examine for broken packages and repair them automatically.

Since you booted up to the cdrom, it is probably mounted somewhere. Try typing "mount" by itself. You will get a list of mounts. If you need to mount a different CDROM, then create a mountpoint for it and mount it with
mount -t iso9660 /dev/hdc /mnt/cdrom -o ro,unhide
Where /dev/hdc is the cdrom device. Yours may be different.
And where /mnt/cdrom is the directory you created for the mount point.

You could also go to the http://www.pbone.net website and filter your search for your particular distro and version. You can download the rpm package from there.

Last edited by jschiwal; 05-20-2007 at 02:15 AM.
 
Old 05-20-2007, 08:32 PM   #5
keysorsoze
Member
 
Registered: Apr 2004
Location: Queens, NY
Distribution: Red Hat, Solaris
Posts: 295

Original Poster
Rep: Reputation: 30
jschiwal

Thanks for all the help you are my hero! I solved my problem using rpm2cpio & cpio like you suggested and copied all the files in the package back to their original locations. I had to go into Red Hat rescue mode to perform this. I crossed my fingers and rebooted a volia it worked! After logging in I simply ran an up2date and reinstalled the glibc package. I was just about to blow the machine away and rebuild, my boss was pissed at me too for taking down our monitoring box for the last few days. Everything is back online again.


Thanks again don't know what I would have done with out your help.
 
Old 03-15-2010, 05:41 AM   #6
joaquin386
LQ Newbie
 
Registered: Mar 2010
Posts: 12

Rep: Reputation: 0
The up2date is it necesary to run?

Where is teh glibc in the DVD installation CD?

Last edited by joaquin386; 03-15-2010 at 08:20 AM.
 
Old 03-15-2010, 01:36 PM   #7
keysorsoze
Member
 
Registered: Apr 2004
Location: Queens, NY
Distribution: Red Hat, Solaris
Posts: 295

Original Poster
Rep: Reputation: 30
Hi Joaquin386, I ran up2date to reinstall the glibc rpm. By using jschiwal's method you only place back the files extracted from the RPM to get the system back and functional you do not reinstall the rpm. After I booted the system I used up2date to reinstall glibc. Here is the location of rpms located on the dvd - /disc1/Redhat/RPMS. This is from my RHEL 4.8 disk.
 
Old 03-15-2010, 01:44 PM   #8
smeezekitty
Senior Member
 
Registered: Sep 2009
Location: Washington U.S.
Distribution: M$ Windows / Debian / Ubuntu / DSL / many others
Posts: 2,339

Rep: Reputation: 231Reputation: 231Reputation: 231
You just screwed your distro.
Never ever remove glibc.
You could try to copy the files manually from an install cd.
 
Old 03-16-2010, 03:34 AM   #9
joaquin386
LQ Newbie
 
Registered: Mar 2010
Posts: 12

Rep: Reputation: 0
Ok thanks. I manage to recover the system.

Before crushing the system I install the gcc to try to work with microfocus COBOL but it never work. That is the reason I try to uninstall all the libraries for the gcc (and the system crash even though it had two versions of glibc, I removed the newer one).

After the recover of the system I decided to reinstall everything to install the gcc from scratch (from installation CDs) in case any links where missing. So it could work with microfocus COBOL or at least make a clean start.

Sadly it got stuck in:
Attempting to start from CD
Attempting to start from Hard Drive C:
GRUB

I have to try these:
http://forums11.itrc.hp.com/service/...readId=1181878

Last edited by joaquin386; 03-16-2010 at 04:05 AM.
 
Old 03-17-2010, 05:06 AM   #10
joaquin386
LQ Newbie
 
Registered: Mar 2010
Posts: 12

Rep: Reputation: 0
Successfully reover the system after the GRUB stuck.

System back to normal.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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



Similar Threads
Thread Thread Starter Forum Replies Last Post
HELP! broke rpm and gcc theetderks Linux - Software 5 10-29-2004 09:41 PM
Glibc2.3.2 broke RPM isel Linux - Software 0 04-08-2004 02:26 PM
2.6 kernel broke rpm tektone Linux - Software 2 02-20-2004 02:10 PM
Broke my RPM program vincebs Red Hat 4 12-29-2003 02:46 AM
I think I broke RPM kiteless Linux - Software 1 08-31-2003 12:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:05 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