HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

What does "psql: /usr/pgsql-11/lib/libpq.so.5: no version information available (required by psql)" actually mean?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
usrwhatavailablelibversionmeanlibpqpsqlactuallydoes

Problem

I have a question regarding following output:

[nikola@192 ~] $ sudo su - postgres
[postgres@192 ~] $ psql dvdrental postgres
psql: /usr/pgsql-11/lib/libpq.so.5: no version information available (required by psql)
psql: /usr/pgsql-11/lib/libpq.so.5: no version information available (required by psql)
psql (11.7, server 11.8)
Type "help" for help.

dvdrental=#


What do following two messages stand for and why? Messages I am asking about:

  • psql: /usr/pgsql-11/lib/libpq.so.5: no version information available (required by psql)



  • psql (11.7, server 11.8) - BTW, for this psql --version command I get following output:


psql (PostgreSQL) 11.8 (had to install PostgreSQL Server version 11.7 in order to perform command such as \dt and \l)
...and also this output:

postgres=# select * FROM version();
                                                version                                                 
--------------------------------------------------------------------------------------------------------
 PostgreSQL 11.8 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 9.3.1 20200408 (Red Hat 9.3.1-2), 64-bit
(1 row)


P.S. I'm running PostgreSQL 11.8 on Fedora 30.

UPDATE1:
As requested by @LaurenzAlbe output for rpm -qa|grep postgres command is:

[nikola@192 ~] $ rpm -qa|grep postgres
postgresql-11.7-2.fc30.x86_64
postgresql11-11.8-1PGDG.f30.x86_64
postgresql11-libs-11.8-1PGDG.f30.x86_64
postgresql11-server-11.8-1PGDG.f30.x86_64
postgresql-server-11.7-2.fc30.x86_64


UPDATE2:

I've ran dnf remove postgresql postgresql-server command -> databases are still there and I can access them via pgAdmin4 and psql: /usr/pgsql-11/lib/libpq.so.5: no version information available (required by psql message is no longer showing up. But, there is now new issue -> when I access postgres shell in terminal using sudo su - postgres command and then perform psql some-database-name postgres I get message

bash: psql: command not found...

Install packag

Solution

You have installed a mixture of packets: some from the Fedora distribution, some from the PostgreSQL Global Development group.

These don't work well together. In particular, you have psql from the Fedora packages in the PATH, but libpq from the PGDG packages is on the library path.

That explains your question #2.

Ad question #1: that warning is printed if the library version of the installed library is lower than the one the software was linked with.

Remove the Fedora packages to get rid of the problem:

dnf remove postgresql postgresql-server


I hope that puts the correct psql on your PATH; if not, reinstall the postgresql11 package.

Code Snippets

dnf remove postgresql postgresql-server

Context

StackExchange Database Administrators Q#269473, answer score: 9

Revisions (0)

No revisions yet.