Upgraded to 20.8.1 - mismatch library

Had GVM 20.08 installed on Ubuntu (20.04.1) with PostgresSQL 12.6 and worked fine, have recently upgraded the library to 20.8.1 and now can’t seem to start gvm, shows the following error

md manage:WARNING:2021-05-28 14h22.02 utc:3970: sql_exec_internal: SQL: CREATE OR REPLACE FUNCTION hosts_contains (text, text) RETURNS boolean AS ‘/opt/gvm/lib/libgvm-pg-server’, ‘sql_hosts_contains’ LANGUAGE C IMMUTABLE;
md manage:WARNING:2021-05-28 14h22.02 utc:3970: sqlv: sql_exec_internal failed
md main:MESSAGE:2021-05-28 14h25.32 utc:4035: Greenbone Vulnerability Manager version 20.08.1~git-098da931-gvmd-20.08 (GIT revision 098da931-gvmd-20.08) (DB revision 233)
md manage:WARNING:2021-05-28 14h25.32 utc:4047: sql_exec_internal: PQexec failed: ERROR: incompatible library “/opt/gvm/lib/libgvm-pg-server.so”: version mismatch
DETAIL: Server is version 12, library is version 10.

I’ve rebuilt all the libraries including GVM using the following commands

cd gvmd &&
export PKG_CONFIG_PATH=/opt/gvm/lib/pkgconfig:$PKG_CONFIG_PATH &&
mkdir build &&
cd build/ &&
cmake -DCMAKE_INSTALL_PREFIX=/opt/gvm … &&
make &&
make doc &&
make install &&
cd /opt/gvm/src

It’s updated the libgvm-pg-server.so file but it’s still reporting it as version 10, not sure how to fix this, any help greatly appreciated.

AFAIK this means that your system is running PostgreSQL server 12 but gvmd (libgvm-pg-server.so) was build against the header / development files of PostgreSQL server 10.

Uninstalling all older PostgreSQL server 10 related packages and rebuilding gvmd afterwards should solve this.

1 Like