Re: /usr/bin/ld: cannot find -lpq

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: /usr/bin/ld: cannot find -lpq
Дата
Msg-id 16023.1259907694@sss.pgh.pa.us
обсуждение исходный текст
Ответ на /usr/bin/ld: cannot find -lpq  (Tena Sakai <tsakai@gallo.ucsf.edu>)
Ответы Re: /usr/bin/ld: cannot find -lpq  (Tena Sakai <tsakai@gallo.ucsf.edu>)
Re: /usr/bin/ld: cannot find -lpq  (Tena Sakai <tsakai@gallo.ucsf.edu>)
Список pgsql-admin
Tena Sakai <tsakai@gallo.ucsf.edu> writes:
> ... I just tried recompiling it on that machine and it compiles without a
> complaint.  I now need to re-compile it on a Intel 32-bit machine running
> centOS.  When I issue the same command on the centOS machine, I get
> complaint:
>   /usr/bin/ld: cannot find -lpq
>   collect2: ld returned 1 exit status

> I thought that this meant that the shared library named libpq.so.bla
> is missing.  But to my surprise, I find libpq.so.4.1 in /usr/lib
> directory.  (There is also a symbolic link libpq.so.4 pointing at
> libpq.so.4.1 in the same place.)

What you need to build a program relying on a shared library is
libfoo.so --- not libfoo.so.n, which is what is used at runtime.
Normally, libfoo.so is a symlink provided by the -devel package
for the library.  In short, then, your problem is that you don't
have postgresql-devel installed.  What seems odd is that you got
this far, because postgresql-devel also carries the header files
you need for compiling callers of libpq (ie, /usr/include/libpq-fe.h).
I'd have expected a failure mentioning lack of libpq-fe.h.  Seems
like you must have some sort of broken partial installation on
that machine.

            regards, tom lane

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

Предыдущее
От: Tena Sakai
Дата:
Сообщение: Re: /usr/bin/ld: cannot find -lpq
Следующее
От: Tena Sakai
Дата:
Сообщение: Re: /usr/bin/ld: cannot find -lpq