By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,708 Members | 2,086 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,708 IT Pros & Developers. It's quick & easy.

psql error:cannot open libpq.so.3

P: n/a
Hi All,
Took a break from developing on pgsql 7.3 to set up network printing
where I added another host(localhost 193.168.1.2) in red hat network
settings. Later, I could start postmaster but when I started psql I got
the following error when I issue this command:

psql -h localhost -U postgres nba

-bash-2.05b$ psql -h localhost -U postgres nba
psql: error while loading shared libraries: libpq.so.3: cannot open
shared object file: No such file or directory
-bash-2.05b$

I tool this as an opportunity to upgrade from 7.3.2 rpm to 7.3.4.source.
Now I'm is a real pickle. I can create the test database but still get
the same error even though I wiped out the pgsql directories upon
installation.

I checked and libpq.so.3 has a path of /var/lib/pgsql/libpq.so.3, and
the database directory is /usr/local/pgsql. All the files in the pgsql
directories are owned by 'postgres'.
Any ideas what could be causing the problem?
Thanks in advance,
Phil Campaigne
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Phil Campaigne <pc********@charter.net> writes:
-bash-2.05b$ psql -h localhost -U postgres nba
psql: error while loading shared libraries: libpq.so.3: cannot open
shared object file: No such file or directory


This could mean either that libpq.so itself is not where your dynamic
linker will look for it, or that some library it depends on (libssl
is a possible example) is not where your dynamic linker will look for
it.

Try first "ldd /path/to/psql" to verify that psql's reference to
libpq.so is being resolved sanely. If so, do ldd on libpq.so to see how
its references are resolved (or not). If necessary, check the
referenced libraries, etc, till you find what's not resolved.

Once you know where the problem is, install the needed library, or
update your ldconfig configuration so it can find that library.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.