LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   ldconfig problem (https://www.linuxquestions.org/questions/slackware-14/ldconfig-problem-402623/)

ag20 01-12-2006 04:52 PM

ldconfig problem
 
This is on Slackware 10.2
I removed openssl packages and then tried to reinstall from openssl-bla.bla.tar.gz. configured as shared, make install, and ldconfig. everything seemed fine. Tried lynx and it error saying it couldn't find libssl.so.0
Doing a ldconfig -p | grep libssl -
showed libssl.so and libssl.so.0.9.7 but no libssl.so.0

I went to /usr/local/ssl/lib and made sure there was a link libssl.so.0, it was there.

So I got rid of the links and ldconfig'ed and made the two links one at a time and ldconfig'ed between each one and looked at the results. here is the output
Code:

cd /usr/local/ssl/lib
rm libssl.so
rm libssl.so.0
ls -l libssl*
-rw-r--r--  1 root root 280984 2006-01-12 16:08 libssl.a
-r-xr-xr-x  1 root root 213181 2006-01-12 16:08 libssl.so.0.9.7
/sbin/ldconfig
/sbin/ldconfig -p | grep 'libssl\.' -
        libssl.so.0.9.7 (libc6) => /usr/local/ssl/lib/libssl.so.0.9.7

ln -s libssl.so.0.9.7 libssl.so.0
ls -l libssl*
-rw-r--r--  1 root root 280984 2006-01-12 16:08 libssl.a
lrwxrwxrwx  1 root root    15 2006-01-12 21:59 libssl.so.0 -> libssl.so.0.9.7
-r-xr-xr-x  1 root root 213181 2006-01-12 16:08 libssl.so.0.9.7
/sbin/ldconfig
/sbin/ldconfig -p | grep 'libssl\.' -
        libssl.so.0.9.7 (libc6) => /usr/local/ssl/lib/libssl.so.0.9.7

ln -s libssl.so.0 libssl.so
ls -l libssl*
-rw-r--r--  1 root root 280984 2006-01-12 16:08 libssl.a
lrwxrwxrwx  1 root root    11 2006-01-12 21:59 libssl.so -> libssl.so.0
lrwxrwxrwx  1 root root    15 2006-01-12 21:59 libssl.so.0 -> libssl.so.0.9.7
-r-xr-xr-x  1 root root 213181 2006-01-12 16:08 libssl.so.0.9.7
/sbin/ldconfig
/sbin/ldconfig -p | grep 'libssl\.' -
        libssl.so.0.9.7 (libc6) => /usr/local/ssl/lib/libssl.so.0.9.7
        libssl.so (libc6) => /usr/local/ssl/lib/libssl.so


my ldconfig does not like libssl.so.0

I did try this script on an older slackware installation and ldconfig made the libssl.so.0 link just fine.

gilead 01-12-2006 06:39 PM

Have you tried adding /usr/local/ssl/lib to /etc/ld.so.conf and running ldconfig?

Franklin 01-12-2006 07:16 PM

From my Slackware 10.2 (current) install

Code:

steve@peggyo:~$ locate libssl.so
/usr/lib/libssl.so.0.9.7
/usr/lib/libssl.so
/usr/lib/libssl.so.0
/usr/local/Adobe/Acrobat7.0/Reader/intellinux/lib/libssl.so.0.9.6
/usr/local/Adobe/Acrobat7.0/Reader/intellinux/lib/libssl.so
/usr/local/Adobe/Acrobat7.0/Reader/intellinux/lib/libssl.so.0
/usr/libexec/apache/libssl.so


steve@peggyo:~$ ls -la /usr/lib/libssl*
-rw-r--r--  1 root root 305754 2005-10-13 00:17 /usr/lib/libssl.a
lrwxrwxrwx  1 root root    11 2005-10-15 08:01 /usr/lib/libssl.so -> libssl.so.0*
lrwxrwxrwx  1 root root    15 2005-10-15 08:01 /usr/lib/libssl.so.0 -> libssl.so.0.9.7*
-r-xr-xr-x  1 root root 199448 2005-10-13 00:17 /usr/lib/libssl.so.0.9.7*
-rwxr-xr-x  1 root root 134108 2005-09-23 17:52 /usr/lib/libssl3.so*

Besides adding the current path to ld.so.conf, you could also compile with the --prefix=/usr option which would deposit it where it was originally (/usr/lib). Of course, you might have good reasons for doing it the way you did. Just a suggestion.

ag20 01-13-2006 01:49 PM

I should have mentioned that I had included /usr/local/ssl/lib in the ld.so.conf.
I allowed the install to go to /usr/local... because I beleve that the convention is for user installed packages to go there and packages that are part of the distribution go to /usr...

I have done this before on Slackware 9.1. ie remove the slackware openssl packages and then install the most recent openssl tarball without problem.

This time with Slackware 10.2 I removed the packeges and tried openssl-0.9.8a. The install went fine. Then I noticed that lynx and wget wouldn't start because of no libssl.so.0. So I got looking in the install of openssl-0.9.8a and there was no libssl.so.0 symbolic link. Thats when I tried making the link by hand and running ldconfig. That didn't work. So I tried openssl-0.9.7e which had make the libssl.so.0 symlink on my 9.1 system. That didn't work either even though the make had created the libssl.so.0 symlink.

I think I will just use the Slackware openssl packages for now.

Franklin 01-13-2006 04:27 PM

Quote:

I allowed the install to go to /usr/local... because I believe that the convention is for user installed packages to go there and packages that are part of the distribution go to /usr...
Yes, I follow the same convention with software. I have quite a few programs compiled from source living in /usr/local. I make an exception with libs that are part of the core distribution and live in /usr/lib (freetype for example). In these cases I always use the --prefix=/usr option. It seems to save me headaches such as yours - of course there may be reasons why this is a bad thing to do, but I have not been bitten yet. Maybe I'm just lucky. Perhaps someone might offer another opinion on this. I'm afraid I don't have any experience with compiling openssl from source. Can't provide any examples from experience. Good luck.


All times are GMT -5. The time now is 06:00 PM.