Re: error while loading shared libraries: libpq.so.3

From: phil campaigne <pcampaigne(at)charter(dot)net>
To: Russell Smith <mr-russ(at)pws(dot)com(dot)au>, pgsql-general(at)postgresql(dot)org
Subject: Re: error while loading shared libraries: libpq.so.3
Date: 2005-02-21 17:57:02
Message-ID: 421A20EE.9030002@charter.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Russell Smith wrote:

>On Mon, 21 Feb 2005 08:05 pm, Surabhi Ahuja wrote:
>
>
>>it now says:
>>
>>i do the following
>>
>>make sample
>>LDLIBRARY = /usr/local/pgsql/lib ./sample
>>
>>
>>LDLIBRARY: Command not found.
>>
>>
>>do you still experience problems when you run
>>LDLIBRARY=/usr/local/pgsql/lib ./sample
>>
>>
>
>Note there is no SPACE in the example I have given.
>LDLIBRARY=/usr/local...
>
>NOT
>
>LDLIBRARY = /usr/...
>
>Regards
>
>Russell Smith.
>
>
>
>>________________________________
>>
>>From: Russell Smith [mailto:mr-russ(at)pws(dot)com(dot)au]
>>Sent: Mon 2/21/2005 2:19 PM
>>To: Surabhi Ahuja
>>Cc: pgsql-general(at)postgresql(dot)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.
>>
>>
>>
>>
>>
>>
>>
>
>---------------------------(end of broadcast)---------------------------
>TIP 6: Have you searched our list archives?
>
> http://archives.postgresql.org
>
>
>
Russell,
Does it help if you execute the following?

LD_LIBRARY_PATH=/usr/local/pgsql/lib
export LD_LIBRARY_PATH
PATH=/usr/local/pgsql/bin:$PATH
export PATH

good luck,
Phil

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Noel Whelan 2005-02-21 17:59:25 ideally a non-volatile function?
Previous Message tony_caduto 2005-02-21 17:54:26 function body error checking issues