psql: error while loading shared libraries: psql: undefined symbol: get_progname

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

psql: error while loading shared libraries: psql: undefined symbol: get_progname

Kelvin T. Leung
Hi,

I am new to postgres. I hope that ppl out there can give me some help.

I have installed postgres on my system, which runs with Fedora 2 on a
P-IV machine.

I have created a postgres account. I am able to use psql (under
postgres a/c) without any problem.

I have created another postgres user account using my OS login name and
have given it all the
permission to create user and database.

Now, I am unable to run psql using my own OS login a/c. And I get an
error message:

        psql: error while loading shared libraries: psql: undefined symbol:
get_progname

I check LD_LIBRARY_PATH and it has  /usr/local/pgsql/lib in the path.

Any idea what went wrong?

I tried to use
       
        psql -d test -U kelvin -W xxxx

I still get the same error message.

Thanks.
-Kelvin


---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend
Reply | Threaded
Open this post in threaded view
|

Re: psql: error while loading shared libraries: psql: undefined symbol: get_progname

Tom Lane-2
"Kelvin T. Leung" <[hidden email]> writes:
> Now, I am unable to run psql using my own OS login a/c. And I get an
> error message:
> psql: error while loading shared libraries: psql: undefined symbol:
> get_progname

This is a version-skew issue: you are trying to use a psql executable
with a libpq.so library that's older or newer (I forget which) than the
psql executable is.

> I check LD_LIBRARY_PATH and it has  /usr/local/pgsql/lib in the path.

On Fedora (and other Linuxen) you should basically never rely on
LD_LIBRARY_PATH, for exactly the reason you're seeing here: programs
work or fail depending on environment.  The correct way is to set up
the ldconfig search path to include directories where shared libraries
exist.

Also, it'd probably be a good idea to make sure you have only one set
of Postgres executables+shared libraries on the machine.  You've
evidently got at least two :-(

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend