Re: error while loading shared libraries: libpq.so.3 - Mailing list pgsql-general

From Surabhi Ahuja
Subject Re: error while loading shared libraries: libpq.so.3
Date
Msg-id CE5C48E227F8ED4990FAC4332100ADC621B500@EVS.iiitb.ac.in
Whole thread Raw
In response to error while loading shared libraries: libpq.so.3  ("Surabhi Ahuja " <surabhi.ahuja@iiitb.ac.in>)
Responses Re: error while loading shared libraries: libpq.so.3
List pgsql-general
it now says:
 
i do the following
 
make sample
LDLIBRARY = /usr/local/pgsql/lib ./sample

LDLIBRARY: Command not found.
 


From: Russell Smith [mailto:mr-russ@pws.com.au]
Sent: Mon 2/21/2005 2:19 PM
To: Surabhi Ahuja
Cc: pgsql-general@postgresql.org
Subject: Re: [GENERAL] error while loading shared libraries: libpq.so.3

***********************
Your mail has been scanned by InterScan VirusWall.
***********-***********


On Mon, 21 Feb 2005 06:17 pm, Surabhi Ahuja wrote:
>  i have written a program sample.c
> it is as folllows:
> #include<stdlib.h>
> #include<libpq-fe.h>
> int main()
> {
>         PGconn *myconnection = PQconnectdb("");
>         printf("Hi");
>         return 0;
> }
>
> I then compile this program using makefile
> make sample
> cc -I/usr/local/pgsql/include    sample.c  -L/usr/local/pgsql/lib -lpq -o sample
> I then run it....and it gives and error
> [indra:/homes/surabi] ./sample
> ./sample: error while loading shared libraries: libpq.so.3: cannot open shared object file: No such file or directory
> Please tell what the problem is..and how should I rectify it?
>
Your library is in /usr/local/pgsql/lib  this is obviously not in your ld.so.conf

do you still experience problems when you run
LDLIBRARY=/usr/local/pgsql/lib ./sample

Regards

Russell Smith.


pgsql-general by date:

Previous
From: "Surabhi Ahuja "
Date:
Subject: Re: error while loading shared libraries: libpq.so.3
Next
From: Csaba Nagy
Date:
Subject: Re: Ways to speed up dump&reload