LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Error loading shared libraries--everything's broken! (https://www.linuxquestions.org/questions/linux-software-2/error-loading-shared-libraries-everythings-broken-271553/)

TexasDex 12-29-2004 11:44 AM

Error loading shared libraries--everything's broken!
 
When I boot up my computer, a whole lot of services that rely on shared libraries fail to load, with some variation of the following message:

Code:


Starting sshd:/usr/sbin/sshd: error while loading shared libraries:
libkrb5.so.3: cannot open shared object file: No such file or director
[FAILED]

But all of the files that they need do exist, in the same directories as they've always been in:
Code:

[root@Meg root]# locate libkrb5.so.3
/usr/kerberos/lib/libkrb5.so.3.1
/usr/kerberos/lib/libkrb5.so.3
[root@Meg root]#

It all started when I tried to install the latest version of Enlightenment on my RH8 server. I got the latest RPM, then downloaded the src tarball for imlib2. I didn't notice if it failed (with the following error message) or not, so I installed it, and then installed the enlightenment RPM, forcing it to ignore dependencies because rpm never seems to detect it when I compile something from the tarball. But it had compiled without PNG support, so I had to install the newest version of that. When I finally was able to start compiling it with PNG support, it gave me the following error message:
Code:

gcc -g -O2 -o .libs/imlib2 main.o  -L/usr/X11R6/lib ../src/.libs/libImlib2.so
/usr/bin/ld: warning: libXext.so.6, needed by
../src/.libs/libImlib2.so, not found (try using -rpath or -rpath-link)

Then things started failing left and right. I quit enlightenment and tried to open TWM, only to find that:
Code:

twm: error while loading shared libraries: libX11.so.6:
cannot open shared object file: No such file or directory

Enlightenment failed with the same message. I tried going to INIT 3 and back to init 5, and X seemed to start normally, but when I put my password in, I got booted back to the graphical login screen, even when trying to login to xterm-only mode. So I killed a 90+ day uptime and rebooted, only to find that most of my services failed to start because of the error message at the top!

Because of something I vaugely remember from trying LFS a while back, I ran this command to see if my dynamic loader was still there:
Code:

[root@Meg imlib2-1.1.2]# readelf -l /bin/cat | grep interpreter
      [Requesting program interpreter: /lib/ld-linux.so.2]

The file exists, in fact all of the required files seem to exist and be in the right places, so I really don't know what else to do :confused:

HELP!

Ironica 12-29-2004 04:14 PM

Is the path to the libraries (/usr/kerberos/lib) in /etc/ld.so.conf ? If not, add it, run ldconfig, and try again. If it's already there, try running ldconfig anyway. Also, try adding the path to the LD_LIBRARY_PATH variable.

I experienced some weird problems, which were quite similar, and this worked for me.

foo_bar_foo 12-29-2004 04:15 PM

the only thing i can think of is a
chmod -R
gone bad bogus permission bobulation

or destroyed /etc/ld.so.conf and it's binaries made with "ldconfig"
easy enough to rebuild to see

TexasDex 12-29-2004 04:34 PM

I don't know how it happened, but it turns out that I had somehow reset my /etc/ld.so.conf file. Adding the required paths to it and running ldconfig worked nicely. Big thanks!


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