LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions
User Name
Password
Linux - Distributions This forum is for Distribution specific questions.
Red Hat, Slackware, Debian, Novell, LFS, Mandriva, Ubuntu, Fedora - the list goes on and on... Note: An (*) indicates there is no official participation from that distribution here at LQ.

Notices



Reply
 
Search this Thread
Old 12-21-2006, 01:01 AM   #1
tebet11@yahoo.com
LQ Newbie
 
Registered: Dec 2006
Distribution: RHEL4
Posts: 3

Rep: Reputation: 0
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
 
Old 12-21-2006, 06:53 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,755
Blog Entries: 54

Rep: Reputation: 2974Reputation: 2974Reputation: 2974Reputation: 2974Reputation: 2974Reputation: 2974Reputation: 2974Reputation: 2974Reputation: 2974Reputation: 2974Reputation: 2974
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.
 
Old 12-23-2006, 09:25 PM   #3
mipia
Member
 
Registered: May 2003
Location: lake michigan
Distribution: Debian, Mint, Slackware
Posts: 457

Rep: Reputation: 35
yes, you would probably have to reinstall it again and run the command ldconf or ldconfig (cant recall which).
 
Old 12-25-2006, 08:56 PM   #4
tebet11@yahoo.com
LQ Newbie
 
Registered: Dec 2006
Distribution: RHEL4
Posts: 3

Original Poster
Rep: Reputation: 0
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
 
Old 12-25-2006, 09:13 PM   #5
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655
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
 
  


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
Can I recover a deleted file in Linux ? josedsilva Linux - General 9 01-05-2010 08:49 AM
Accidentally deleted System.map file... emalbum Linux - Kernel 1 09-03-2006 11:14 AM
I have deleted a file thru rm can i recover it ricka343 Linux - General 2 06-27-2006 04:28 AM
How to recover deleted file v1nc3nt Linux - Newbie 5 05-23-2006 04:28 AM
Help needed to recover data from ext3 file system where mkfs was issued accidentally kapilsampath Linux - General 4 04-26-2005 08:52 AM


All times are GMT -5. The time now is 07:27 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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration