LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Distributions (https://www.linuxquestions.org/questions/linux-distributions-5/)
-   -   How to recover libc.so.6 file if it's deleted accidentally? (https://www.linuxquestions.org/questions/linux-distributions-5/how-to-recover-libc-so-6-file-if-its-deleted-accidentally-512455/)

tebet11@yahoo.com 12-21-2006 12:01 AM

How to recover libc.so.6 file if it's deleted accidentally?
 
I have my file libc.so.6 deleted accidentally. So, everytime I type-in any command in the shell prompt, it always returns segmentation fault.

Anyone know how to recover this file? Appreciate for all your help.

Regards,
Adi

unSpawn 12-21-2006 05:53 AM

Hello and welcome to LQ, hope you like it here.
Please fill in your user profile so we know which distro you use.

There is no way to safely recover a complete file for usage on journalling filesystems. Easiest way would be to reinstall the package. Else check your package manager to see which version you need and download then extract the file. You're looking for Glibc.

mipia 12-23-2006 08:25 PM

yes, you would probably have to reinstall it again and run the command ldconf or ldconfig (cant recall which).

tebet11@yahoo.com 12-25-2006 07:56 PM

Hi,

I am using RHEL4.

I found that the file is actually not deleted but the symbolic link for libc.so.6 has been modified. I tried to run 'ln' command but it shows 'Segmentation Fault'. Other commands also generates segmentation fault.

Any idea how to put back the correct symbolic link?

Thanks,
Adi

jschiwal 12-25-2006 08:13 PM

First find the exact glibc rpm package that was installed:
rpm -q --info glibc. If you are running the 64 bit version, then you may need a glibc-32bit package instead.

Since glibc is already installed, you can force install it. "sudo rpm -I --force glibc-<version>.rpm"

If one link was deleted, maybe more of them where.

There is an rpm command option (-V) to verify packages which can tell you if you are missing files.
rpm -V glibc


All times are GMT -5. The time now is 02:00 AM.