LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   How to restore the /lib/libc.so.6 link or ....??? (https://www.linuxquestions.org/questions/linux-server-73/how-to-restore-the-lib-libc-so-6-link-or-840799/)

sharkman 10-27-2010 12:50 PM

How to restore the /lib/libc.so.6 link or ....???
 
Good Morning,

I've been working with out servers for the past several years. We have a mix of OS. Fedora, Ubuntu, RHEL, etc. I've accidentally trashed the libc.so.6 link and now nothing but shell commands work. I tried to echo "/lib/libc-2.10.2.so into the /etc/sestatus.conf file, but that didn't have any affect. Does anyone know where the search path is maintained besides PATH so I can try to point the apps to the /lib/libc-2.10.2.so file? I have a bunch of SVN repos on this server and right now, no one has access. I'm desperate.

thank-you in advance,
Respectfully,
sharkman.

MensaWater 10-27-2010 12:59 PM

You can try setting LD_LIBPATH.

You say you've destroyed the "link". Does "ln -s" not work to recreate the link?

GrapefruiTgirl 10-27-2010 01:04 PM

On the off-chance that it may help:

On my system, `ldconfig` is a static-compiled executable. Maybe yours is too? If so, maybe you could use it to restore (update) the library links?
Code:

ldconfig -v
If not, maybe I've misunderstood the problem.

Oh, P.S. - the search path for libraries is controlled by /etc/ld.so.conf usually.

sharkman 10-27-2010 04:01 PM

Thank-you. The ldconfig worked through the install disk in rescue mode. The only thing I'm confused about now is I installed Trac in /opt and now it's gone. I did run "upgrade" from the install disk (ISO) image 1, but I didn't think that would blow away anthing in /opt. This is a RAID server and I doubt that Trac is on the other drive, but who knows. This has been a very strange problem.

Thank-you again,
Respectfully,
Wes.

dinhnl 12-28-2011 04:37 AM

Is there any way to restore the /lib/libc.so.6
 
Quote:

Originally Posted by MensaWater (Post 4141256)
You can try setting LD_LIBPATH.

You say you've destroyed the "link". Does "ln -s" not work to recreate the link?

>> Hi, i am Dinh. I was updating the eglibc to my board to support valgrind on my board. I copied the libc-2.13.so to /lib and used "ln -s" to change the link of libc.so.6 from libc-2.3.5.so to the libc-2.13.so but the "ln" did not work.
>> If this file is removed by "rm", the "ln" or "su" and some linux services die. Then I had to reload the file system for the board.
>> I believe the "ln" or "su" or other linux commands are using the /lib/libc.so.6
>> Is there any other way to update the libc tricky without update the root file system?

MensaWater 01-03-2012 12:19 PM

Please open a new thread for your question rather than appending to old threads. That way it has higher visibility.

What command did you type to do the link? What response did the command give?


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