Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: Trouble connecting locally after 9.2.4 upgrade

1 view
Skip to first unread message

Tom Lane

unread,
Apr 4, 2013, 3:55:59 PM4/4/13
to
"Campbell, Lance" <la...@illinois.edu> writes:
> Error:
> psql: symbol lookup error: psql: undefined symbol: PQconnectdbParams

This looks like psql is picking up a rather ancient version of libpq.so.
Applying ldd or local equivalent to the psql executable would help you
figure out where it's getting that library from. Bottom line though is
probably that you forgot to worry about rpath or something similar while
configuring the new build.

regards, tom lane


--
Sent via pgsql-admin mailing list (pgsql...@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin

Campbell, Lance

unread,
Apr 4, 2013, 4:07:37 PM4/4/13
to
I just found an old posting from 2010-08-15. I added the below. If fixed the issue. But I have never had to add this before. I don't manage the server I run the database on. It might be the case that there was an upgrade of Red Hat since the last time I installed that is causing this to be an issue.

setenv LD_LIBRARY_PATH


Thanks,

Lance Campbell
Software Architect
Web Services at Public Affairs
217-333-0382

Campbell, Lance

unread,
Apr 4, 2013, 4:59:23 PM4/4/13
to
I figured it all out. When I ran the configuration script I told it to put the code in pgsql-9.2.4. Then after the code installed I moved it to pgsql-9.2. Then the install could not find the proper libraries. So it used the system one. I reinstalled but this time with the target directory of pgsql-9.2. It worked fine. I don't need the environment variable LD_LIBRARY_PATH now.

Tom Lane

unread,
Apr 4, 2013, 5:20:07 PM4/4/13
to
"Campbell, Lance" <la...@illinois.edu> writes:
> I figured it all out. When I ran the configuration script I told it to put the code in pgsql-9.2.4. Then after the code installed I moved it to pgsql-9.2. Then the install could not find the proper libraries. So it used the system one. I reinstalled but this time with the target directory of pgsql-9.2. It worked fine. I don't need the environment variable LD_LIBRARY_PATH now.

Hah. Right, because configure would have set things up to build psql
etc with rpaths pointing to the lib directory under the installation
directory it was told to use. So it'd work until you moved the lib
directory.

Moral: be careful about relocating installed trees.

Bruce Hunsaker

unread,
Apr 5, 2013, 1:40:47 PM4/5/13
to
On 04 Apr 13 17 20, Tom Lane wrote:
> "Campbell, Lance" <la...@illinois.edu> writes:
> > I figured it all out. When I ran the configuration script I told it
> > to put the code in pgsql-9.2.4. Then after the code installed I
> > moved it to pgsql-9.2. Then the install could not find the proper
> > libraries. So it used the system one. I reinstalled but this time
> > with the target directory of pgsql-9.2. It worked fine. I don't
> > need the environment variable LD_LIBRARY_PATH now.
>
> Hah. Right, because configure would have set things up to build psql
> etc with rpaths pointing to the lib directory under the installation
> directory it was told to use. So it'd work until you moved the lib
> directory.
>
> Moral: be careful about relocating installed trees.

That's why I like to use LDFLAGS="-Wl,-rpath,'$ORIGIN/../lib'"
when I build. It makes the install tree relocatable.

--
Bruce Hunsaker


NOTICE: This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.
0 new messages