LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-16-2006, 01:22 AM   #1
Dr_Death_UAE
Member
 
Registered: Jul 2005
Location: U.A.E
Distribution: FreeBSD,Fedora,Solaris,AIX
Posts: 168

Rep: Reputation: 30
/usr/bin/ld: cannot find -lpq


hi,

I was installing a software and this error message showup:

/usr/bin/ld: cannot find -lpq
collect2: ld returned 1 exit status
make: *** [hydra] Error 1

i dont know what "lpq" stand for, i search it in http://rpm.pbone.net as libpq, its gave me "postgresql-8.0.7", but its not the missing one.

sorry for my English
 
Old 03-16-2006, 01:26 AM   #2
Dr_Death_UAE
Member
 
Registered: Jul 2005
Location: U.A.E
Distribution: FreeBSD,Fedora,Solaris,AIX
Posts: 168

Original Poster
Rep: Reputation: 30
i solve the problem, the missing file was "postgresql-devel-8.0.7-1"
 
Old 03-16-2006, 02:46 AM   #3
bc8o8
Member
 
Registered: Jun 2003
Location: Boston, MA
Distribution: Debian
Posts: 57

Rep: Reputation: 15
When you see -lpq, its telling the compiler (probably gcc or g++) to load the pq libraries (which will be named libpq-xxxx.so). So if you think the appropriate packages are installed, then a locate libpq* should come up with some results. If it does, make sure the appropriate directories are in your library search path ( $LD_LIBRARY_PATH ) by either adding it manually, in a login script (.bashrc or similar) or adding it to /etc/ld.so.conf and running ldconfig. If no results come up in the "locate" then you either need to update your search database (updatedb) or install the appropriate packages.
 
Old 06-19-2014, 11:18 AM   #4
Nukles
LQ Newbie
 
Registered: Jun 2014
Posts: 1

Rep: Reputation: Disabled
Hi all, I make this ooold thread alive again as I have the same issue. My system is a POWER7+ Server with SLES11 SP3.

When trying to install psycopg2 with easy_install, that is when doing:

Code:
easy_install psycopg2
I receive the following error:

Code:
/usr/lib64/gcc/powerpc64-suse-linux/4.3/../../../../powerpc64-suse-linux/bin/ld: cannot find -lpq
However, I do have postgresql-devel package installed:

Code:
root@xxx> /usr/bin# rpm -qa |grep postgresql
postgresql91-docs-9.1.9-0.3.1
postgresql91-9.1.9-0.3.1
postgresql91-server-9.1.9-0.3.1
postgresql91-contrib-9.1.9-0.3.1
postgresql-init-9.1-0.6.14.1
postgresql-devel-8.3.11-0.1.1
postgresql-8.3.23-0.4.1
I do have libpq:

Code:
root@xxx> /usr/bin# locate libpq                                 [18:12]
/usr/include/pgsql/internal/libpq
/usr/include/pgsql/internal/libpq-int.h
/usr/include/pgsql/internal/libpq/pqcomm.h
/usr/include/pgsql/libpq
/usr/include/pgsql/libpq-fe.h
/usr/include/pgsql/libpq/libpq-fs.h
/usr/include/pgsql/server/libpq
/usr/include/pgsql/server/libpq/auth.h
/usr/include/pgsql/server/libpq/be-fsstubs.h
/usr/include/pgsql/server/libpq/crypt.h
/usr/include/pgsql/server/libpq/hba.h
/usr/include/pgsql/server/libpq/ip.h
/usr/include/pgsql/server/libpq/libpq-be.h
/usr/include/pgsql/server/libpq/libpq-fs.h
/usr/include/pgsql/server/libpq/libpq.h
/usr/include/pgsql/server/libpq/md5.h
/usr/include/pgsql/server/libpq/pqcomm.h
/usr/include/pgsql/server/libpq/pqformat.h
/usr/include/pgsql/server/libpq/pqsignal.h
/usr/lib/libpq.so.5
/usr/lib/libpq.so.5.4
/usr/lib/postgresql91/lib64/libpqwalreceiver.so
/usr/lib64/libpq.so
/usr/lib64/libpq.so.5
/usr/lib64/libpq.so.5.4
/usr/share/doc/packages/postgresql91/html/install-windows-libpq.html
/usr/share/doc/packages/postgresql91/html/libpq-async.html
/usr/share/doc/packages/postgresql91/html/libpq-build.html
/usr/share/doc/packages/postgresql91/html/libpq-cancel.html
/usr/share/doc/packages/postgresql91/html/libpq-connect.html
/usr/share/doc/packages/postgresql91/html/libpq-control.html
/usr/share/doc/packages/postgresql91/html/libpq-copy.html
/usr/share/doc/packages/postgresql91/html/libpq-envars.html
/usr/share/doc/packages/postgresql91/html/libpq-events.html
/usr/share/doc/packages/postgresql91/html/libpq-example.html
/usr/share/doc/packages/postgresql91/html/libpq-exec.html
/usr/share/doc/packages/postgresql91/html/libpq-fastpath.html
/usr/share/doc/packages/postgresql91/html/libpq-ldap.html
/usr/share/doc/packages/postgresql91/html/libpq-misc.html
/usr/share/doc/packages/postgresql91/html/libpq-notice-processing.html
/usr/share/doc/packages/postgresql91/html/libpq-notify.html
/usr/share/doc/packages/postgresql91/html/libpq-pgpass.html
/usr/share/doc/packages/postgresql91/html/libpq-pgservice.html
/usr/share/doc/packages/postgresql91/html/libpq-ssl.html
/usr/share/doc/packages/postgresql91/html/libpq-status.html
/usr/share/doc/packages/postgresql91/html/libpq-threading.html
/usr/share/doc/packages/postgresql91/html/libpq.html
/usr/share/locale/cs/LC_MESSAGES/libpq5-9.1.mo
/usr/share/locale/de/LC_MESSAGES/libpq5-9.1.mo
/usr/share/locale/es/LC_MESSAGES/libpq5-9.1.mo
/usr/share/locale/fr/LC_MESSAGES/libpq5-9.1.mo
/usr/share/locale/it/LC_MESSAGES/libpq5-9.1.mo
/usr/share/locale/ja/LC_MESSAGES/libpq5-9.1.mo
/usr/share/locale/ko/LC_MESSAGES/libpq5-9.1.mo
/usr/share/locale/pl/LC_MESSAGES/libpq5-9.1.mo
/usr/share/locale/pt_BR/LC_MESSAGES/libpq5-9.1.mo
/usr/share/locale/ru/LC_MESSAGES/libpq5-9.1.mo
/usr/share/locale/sv/LC_MESSAGES/libpq5-9.1.mo
/usr/share/locale/tr/LC_MESSAGES/libpq5-9.1.mo
/usr/share/locale/zh_CN/LC_MESSAGES/libpq5-9.1.mo
/usr/share/locale/zh_TW/LC_MESSAGES/libpq5-9.1.mo
I did define several directories in the LD_LIBRARY_PATH variable, but none seems to work: how do I identify the correct path?

Do you have any idea of why easy_install is looking at that complicated directory path? (/usr/lib64/gcc/powerpc64-suse-linux/4.3/../../../../powerpc64-suse-linux/bin/ld)

Any help appreciated! Thanks!

Last edited by Nukles; 06-19-2014 at 11:20 AM. Reason: Didn't specify easy_install
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
/usr/bin/ld: cannot find -lgdl-1 Lobais Linux - Software 2 10-14-2005 08:25 AM
path in services wrong for clamav updated frm 0.75 to 0.80 usr/bin vs usr/local/bin Emmanuel_uk Linux - Newbie 3 04-22-2005 01:02 AM
Is '/usr/bin/find' reliable if '/bin/ls' has been replaced? DigaMe Linux - Security 2 11-12-2004 10:42 PM
/usr/bin/ld: cannot find -lselinux masand Linux - Software 6 09-03-2004 06:19 AM
/usr/bin/ld: cannot find -lc aa2bi Linux - Newbie 2 06-09-2004 06:32 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:58 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration