[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgresql-admin
Subject:    [ADMIN] Strange thing : ldconfig and libpq.so.2.1
From:       Richard NAGY <richard () presenceweb ! com>
Date:       2001-12-11 15:26:46
[Download RAW message or body]

Hello,

Well, I have a strange problem on linux (Red Hat 6.2). When I type this
command line :

/sbin/ldconfig -p | grep libpq

I have this result :
libpq.so.2 (libc6) => /usr/local/pgsql/lib/libpq.so.2
libpq.so (libc6) => /usr/local/pgsql/lib/libpq.so

One night before on the same machine and at this time on an other one,
we have this :

libpq.so.2.1 (libc6) => /usr/local/pgsql/lib/libpq.so.2.1
libpq.so.2 (libc6) => /usr/local/pgsql/lib/libpq.so.2
libpq.so (libc6) => /usr/local/pgsql/lib/libpq.so

One line has disappeared. The one with libpq.so.2.1.
So, many programs don't work any more.

Ex :
On one machine :
ldd /usr/local/pgsql/bin/psql
The result is :
        libpq.so.2.1 => /usr/local/pgsql/lib/libpq.so.2.1 (0x4001a000)
        libcrypt.so.1 => /lib/libcrypt.so.1 (0x40028000)
        libnsl.so.1 => /lib/libnsl.so.1 (0x40055000)
        libdl.so.2 => /lib/libdl.so.2 (0x4006b000)
        libm.so.6 => /lib/libm.so.6 (0x40070000)
        libutil.so.1 => /lib/libutil.so.1 (0x4008d000)
        libreadline.so.3 => /usr/lib/libreadline.so.3 (0x40090000)
        libtermcap.so.2 => /lib/libtermcap.so.2 (0x400b4000)
        libncurses.so.4 => /usr/lib/libncurses.so.4 (0x400b8000)
        libc.so.6 => /lib/libc.so.6 (0x400fa000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

On an other machine, the result is :
        libpq.so.2 => /usr/local/pgsql/lib/libpq.so.2 (0x40015000)
        libz.so.1 => /usr/lib/libz.so.1 (0x4002a000)
        libcrypt.so.1 => /lib/libcrypt.so.1 (0x40039000)
        libresolv.so.2 => /lib/libresolv.so.2 (0x40066000)
        libnsl.so.1 => /lib/libnsl.so.1 (0x40076000)
        libdl.so.2 => /lib/libdl.so.2 (0x4008c000)
        libm.so.6 => /lib/libm.so.6 (0x40090000)
        libreadline.so.3 => /usr/lib/libreadline.so.3 (0x400ad000)
        libc.so.6 => /lib/libc.so.6 (0x400d1000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
        libtermcap.so.2 => /lib/libtermcap.so.2 (0x401c6000)

We can see that libpq.so.2.1 is not used directly in this second case.
But, psql works well in each case.
The problem comes with our own programs.

For our programs :
ldd /path/to/my/program/my_program
        libpq.so.2.1 => not found
        libc.so.6 => /lib/libc.so.6 (0x4001c000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)

I have a "not found". So, our programs don't work any more!! (They were
compiled on the first machine and afterwards copied on the second one)
The strange thing is that it worked a few days ago on the second
machine! I don't know how to restore a stable state.


How can I correct this ?
In the ldconfig man page, I have seen the -l flag but should I use it
and how ?

I would appreciate a little help.

PS : I have typed the /sbin/ldconfig command line with the good
/etc/ld.so.conf but I still have the problem.

Thank you
Regards.

--
Richard NAGY
Presenceweb / Nameshield



[Attachment #3 (text/html)]

<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Hello,
<p>Well, I have a strange problem on linux (Red Hat 6.2). When I type this
command line :
<p>/sbin/ldconfig -p | grep libpq
<p>I have this result :
<br>libpq.so.2 (libc6) => /usr/local/pgsql/lib/libpq.so.2
<br>libpq.so (libc6) => /usr/local/pgsql/lib/libpq.so
<p>One night before on the same machine and at this time on an other one,
we have this :
<p>libpq.so.2.1 (libc6) => /usr/local/pgsql/lib/libpq.so.2.1
<br>libpq.so.2 (libc6) => /usr/local/pgsql/lib/libpq.so.2
<br>libpq.so (libc6) => /usr/local/pgsql/lib/libpq.so
<p>One line has disappeared. The one with libpq.so.2.1.
<br>So, many programs don't work any more.
<p>Ex :
<br>On one machine :
<br>ldd /usr/local/pgsql/bin/psql
<br>The result is :
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; libpq.so.2.1 => /usr/local/pgsql/lib/libpq.so.2.1
(0x4001a000)
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; libcrypt.so.1 => /lib/libcrypt.so.1
(0x40028000)
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; libnsl.so.1 => /lib/libnsl.so.1
(0x40055000)
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; libdl.so.2 => /lib/libdl.so.2
(0x4006b000)
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; libm.so.6 => /lib/libm.so.6
(0x40070000)
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; libutil.so.1 => /lib/libutil.so.1
(0x4008d000)
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; libreadline.so.3 => /usr/lib/libreadline.so.3
(0x40090000)
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; libtermcap.so.2 => /lib/libtermcap.so.2
(0x400b4000)
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; libncurses.so.4 => /usr/lib/libncurses.so.4
(0x400b8000)
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; libc.so.6 => /lib/libc.so.6
(0x400fa000)
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /lib/ld-linux.so.2 => /lib/ld-linux.so.2
(0x40000000)
<p>On an other machine, the result is :
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; libpq.so.2 => /usr/local/pgsql/lib/libpq.so.2
(0x40015000)
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; libz.so.1 => /usr/lib/libz.so.1
(0x4002a000)
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; libcrypt.so.1 => /lib/libcrypt.so.1
(0x40039000)
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; libresolv.so.2 => /lib/libresolv.so.2
(0x40066000)
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; libnsl.so.1 => /lib/libnsl.so.1
(0x40076000)
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; libdl.so.2 => /lib/libdl.so.2
(0x4008c000)
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; libm.so.6 => /lib/libm.so.6
(0x40090000)
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; libreadline.so.3 => /usr/lib/libreadline.so.3
(0x400ad000)
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; libc.so.6 => /lib/libc.so.6
(0x400d1000)
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /lib/ld-linux.so.2 => /lib/ld-linux.so.2
(0x40000000)
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; libtermcap.so.2 => /lib/libtermcap.so.2
(0x401c6000)
<p>We can see that libpq.so.2.1 is not used directly in this second case.
But, psql works well in each case.
<br>The problem comes with our own programs.
<p>For our programs :
<br>ldd /path/to/my/program/my_program
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; libpq.so.2.1 => not found
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; libc.so.6 => /lib/libc.so.6
(0x4001c000)
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; /lib/ld-linux.so.2 => /lib/ld-linux.so.2
(0x40000000)
<p>I have a "not found". So, our programs don't work any more!! (They were
compiled on the first machine and afterwards copied on the second one)
<br>The strange thing is that it worked a few days ago on the second machine!
I don't know how to restore a stable state.
<br>&nbsp;
<p>How can I correct this ?
<br>In the ldconfig man page, I have seen the -l flag but should I use
it and how ?
<p>I would appreciate a little help.
<p>PS : I have typed the /sbin/ldconfig command line with the good /etc/ld.so.conf
but I still have the problem.
<p>Thank you
<br>Regards.
<pre>--
Richard NAGY
Presenceweb / Nameshield</pre>
&nbsp;</html>


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic