Thread: Fw: Missing Shared Libraries

Fw: Missing Shared Libraries

From
"keith"
Date:
 
----- Original Message -----
From: keith
Sent: Wednesday, March 14, 2001 3:51 PM
Subject: Missing Shared Libraries

I have finally got PostgreSQL running on a Red Hat Linux machine, mostly because of the help of some kind people on this mailing list.
 Next question please. When I try and run /usr/local/pgsql/bin/psql or /usr/local/pgsql/bin/createdb test I get an error that says:
"error in loading shared libraries: libpq.so.2.1: cannot open shared object file: No such file or directory"
 
The file is located at /usr/local/pgsql/lib/libpq.so.2.1 so I don't understand.
Any ideas?

Re: Fw: Missing Shared Libraries

From
jdassen@cistron.nl (J.H.M. Dassen (Ray))
Date:
[Please drop the HTML - this is a mailing list, not the web]

keith <keith@gmetech.com> wrote:
>I get an error that says:
>"error in loading shared libraries: libpq.so.2.1: cannot open shared
>object= file: No such file or directory"
>
>The file is located at /usr/local/pgsql/lib/libpq.so.2.1 so I don't
>underst= and.

The dynamic loader doesn't automagically search through the entire
filesystem for libraries. You need to tell it where your libraries are:
- add '/usr/local/pgsql/lib/' to '/etc/ld.so.conf'
- run 'ldconfig'.

HTH,
Ray
--
I think the most important thing about Linux is that it gives people the
ability to do what they want.
    Alan Cox in http://www2.linuxjournal.com/articles/culture/012.html

Re: Fw: Missing Shared Libraries

From
Christopher Sawtell
Date:
On Thu, 15 Mar 2001 13:11, keith wrote:
> ----- Original Message -----
> From: keith
> To: pgsql-general-owner@postgresql.org
> Sent: Wednesday, March 14, 2001 3:51 PM
> Subject: Missing Shared Libraries
>
>
> I have finally got PostgreSQL running on a Red Hat Linux machine, mostly
> because of the help of some kind people on this mailing list. Next
> question please. When I try and run /usr/local/pgsql/bin/psql or
> /usr/local/pgsql/bin/createdb test I get an error that says: "error in
> loading shared libraries: libpq.so.2.1: cannot open shared object file:
> No such file or directory"
>
> The file is located at libpq.so.2.1 so I don't
> understand. Any ideas?

As the root user you have added the directory name /usr/local/pgsql/lib/
as a single line to the file /etc/ld.so.conf and then run the command
ldconfig havn't you?

--
Sincerely etc.,

 NAME       Christopher Sawtell
 CELL PHONE 021 257 4451
 ICQ UIN    45863470
 EMAIL      csawtell @ xtra . co . nz
 CNOTES     ftp://ftp.funet.fi/pub/languages/C/tutorials/sawtell_C.tar.gz

 -->> Please refrain from using HTML or WORD attachments in e-mails to me
<<--


Re: Re: Fw: Missing Shared Libraries

From
"keith"
Date:
Thanks all, this fixed my problem and off I go again.
----- Original Message -----
From: J.H.M. Dassen (Ray) <jdassen@cistron.nl>
To: <pgsql-general@postgresql.org>
Sent: Wednesday, March 14, 2001 1:36 AM
Subject: [GENERAL] Re: Fw: Missing Shared Libraries


> [Please drop the HTML - this is a mailing list, not the web]
>
> keith <keith@gmetech.com> wrote:
> >I get an error that says:
> >"error in loading shared libraries: libpq.so.2.1: cannot open shared
> >object= file: No such file or directory"
> >
> >The file is located at /usr/local/pgsql/lib/libpq.so.2.1 so I don't
> >underst= and.
>
> The dynamic loader doesn't automagically search through the entire
> filesystem for libraries. You need to tell it where your libraries are:
> - add '/usr/local/pgsql/lib/' to '/etc/ld.so.conf'
> - run 'ldconfig'.
>
> HTH,
> Ray
> --
> I think the most important thing about Linux is that it gives people the
> ability to do what they want.
> Alan Cox in http://www2.linuxjournal.com/articles/culture/012.html
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>


Re: Fw: Missing Shared Libraries

From
"Richard Huxton"
Date:
keith <keith@gmetech.com> said:

> ----- Original Message -----
> From: keith
> To: pgsql-general-owner@postgresql.org
> Sent: Wednesday, March 14, 2001 3:51 PM
> Subject: Missing Shared Libraries
>
>
> I have finally got PostgreSQL running on a Red Hat Linux machine, mostly because of the help of some kind people on
thismailing list. 
>  Next question please. When I try and run /usr/local/pgsql/bin/psql or /usr/local/pgsql/bin/createdb test I get an
errorthat says: 
> "error in loading shared libraries: libpq.so.2.1: cannot open shared object file: No such file or directory"
>
> The file is located at /usr/local/pgsql/lib/libpq.so.2.1 so I don't understand.
> Any ideas?
>

Yep - you need to tell the Linux linker to check that directory for libraries. Since you're on RedHat, edit
/etc/ld.so.confand add this directory to the end of the file. 

Then run /sbin/ldconfig (as root) to update the cache, and check with /sbin/ldconfig -p

If you have an "installation.html" file it should cover this there. The key thing when you install from source is to
read*all* the instructions (twice, making notes) otherwise, without experience the error messages can be a little
bewildering.

- Richard Huxton