Re: Can't not load libpq.so.3

Поиск
Список
Период
Сортировка
От Jeroen T. Vermeulen
Тема Re: Can't not load libpq.so.3
Дата
Msg-id 20031024164131.GB12700@xs4all.nl
обсуждение исходный текст
Ответ на Can't not load libpq.so.3  ("Fabien DAUMEN" <fdaumen@technodiva.com>)
Список pgsql-hackers
On Mon, Oct 20, 2003 at 10:12:28AM +0200, Fabien DAUMEN wrote:
> 
> I link my program with this link option ?L/usr/local/pgsql/lib.
That's good, but it only deals with the compile-time linking.  The
actual loading of a shared library happens at run-time, and since there's
no special reason to assume that the running system will look like the
one you compiled your code on, this library path is not remembered.

So libpq needs to be in your library *load* path as well as your library
*link* path, which you set correctly.

Two workarounds suggest themselves:

1. Make sure your OS can find the library at load time.  On Linux for
example, you'd do this by setting the environment variable LD_LIBRARY_PATH
to include the path /usr/local/pgsql/lib before running your program.

2. Alternatively, create a link to libpq.so somewhere in your existing 
library load path so your system knows where to find it by default.  You
could call it /usr/local/lib/libpq.so, for instance.


Jeroen



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Richard Huxton
Дата:
Сообщение: Re: Broken links in postgreSQL.org ads
Следующее
От: Peter Eisentraut
Дата:
Сообщение: Re: Call for port reports