No Package 'libgvm_base' found

Hello,

When I am trying to install openvas 20.08, I always get the following error when trying to do cmake:

image

However, I am fairly certain that I have the correct version of gvm-libs installed. I have tried uninstalling and reinstalling lib-gvm multiple times but openvas will still not find libgvm_base.

Any help would be appreciated, thank you.

GVM versions

gvm-libs: 20.08

Environment

Operating system: Ubuntu
Kernel: 20.04.1
Installation method / source: Source Code

Hi @Jujjo,

It seems you didnā€™t set PKG_CONFIG_PATH env variable.
export PKG_CONFIG_PATH=/your/location/lib/pkgconfig:$PKG_CONFIG_PATH

1 Like

I have the same error,
when i run cmake ā€¦ -DCMAKE_INSTALL_PREFIX=/opt/gvm in cd ā€¦/ā€¦/openvas/build , i receive

gvm@greenbone:~/openvas/build$ cmake ā€¦ -DCMAKE_INSTALL_PREFIX=/opt/gvm
ā€“ Configuring the Scannerā€¦
ā€“ Looking for clang-formatā€¦
ā€“ Looking for clang-formatā€¦ /usr/bin/clang-format
Set LIBDIR to /opt/gvm/lib
ā€“ Install prefix: /opt/gvm
ā€“ Checking for module ā€˜libgvm_base>=11.0.0ā€™
ā€“ No package ā€˜libgvm_baseā€™ found
CMake Error at /usr/share/cmake-3.16/Modules/FindPkgConfig.cmake:463 (message):
A required package was not found
Call Stack (most recent call first):
/usr/share/cmake-3.16/Modules/FindPkgConfig.cmake:643 (_pkg_check_modules_internal)
misc/CMakeLists.txt:31 (pkg_check_modules)

ā€“ Configuring incomplete, errors occurred!
See also ā€œ/opt/gvm/openvas/build/CMakeFiles/CMakeOutput.logā€.

1 Like

Whatā€™s your PKG_CONFIG_PATH now? Just paste the output of echo $PKG_CONFIG_PATH

1 Like

I got it working thank you.

1 Like

i have the same problem
how did you fix it

Thank you

Iā€™m also running across this same problem on ubuntu 20.04. where is the pkgconfig path? iā€™ve added every path i can think of under the sun for pkgconfig and pkg-config, but still getting the error message. hereā€™s what i have for

echo $PKG_CONFIG_PATH

/usr/lib/x86_64-linux-gnu/pkgconfig:/usr/share/pkgconfig:/opt/gvm/lib/pkgconfig:/usr/bin/pkg-config:/usr/lib/pkgconfig:

finally got it to work! i used this link to provide some background:

i created a CMakeLists.txt file and added only the line:

set(PKG_CONFIG_EXECUTABLE "/usr/bin/pkg-config")

because iā€™m running the cmake command in this build directory

/opt/gvm/gvm-source/openvas/build

with the command

cmake ā€¦ -DCMAKE_INSTALL_PREFIX=/opt/gvm

i placed the CMakeLists.txt file in the /opt/gvm/gvm-source/openvas directory.

hope this helps (and hope this works) for those that come across the same issue i did!

cheers!

nevermind, i think that broke something elseā€¦

starting all over again and doing more research, happen to read the INSTALL.md file in the main openvas directory. if you read through it, it recommends installing the below packages:

apt-get install gcc pkg-config libssh-gcrypt-dev libgnutls28-dev
libglib2.0-dev libjson-glib-dev libpcap-dev libgpgme-dev bison libksba-dev
libsnmp-dev libgcrypt20-dev redis-server

turns out i was missing this dependency:
gir1.2-json-1.0

lo and behold, after installing any missing dependencies, the cmake automagically can ā€œseeā€ the pkgconfig in the path. ha! linux dependency hell at it againā€¦

I canā€™t get to pass this part:

~/source$ cmake $SOURCE_DIR/gvmd-$GVMD_VERSION -DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX -DCMAKE_BUILD_TYPE=Release -DLOCALSTATEDIR=/var -DSYSCONFDIR=/etc -DGVM_DATA_DIR=/var -DGVMD_RUN_DIR=/run/gvmd -DOPENVAS_DEFAULT_SOCKET=/run/ospd/ospd-openvas.sock -DGVM_FEED_LOCK_PATH=/var/lib/gvm/feed-update.lock -DSYSTEMD_SERVICE_DIR=/lib/systemd/system -DDEFAULT_CONFIG_DIR=/etc/default -DLOGROTATE_DIR=/etc/logrotate.d
ā€“ Configuring Greenbone Vulnerability Managerā€¦
ā€“ Install prefix: /opt
ā€“ Checking for module ā€˜libgvm_base>=21.4.1ā€™
ā€“ No package ā€˜libgvm_baseā€™ found
CMake Error at /usr/share/cmake-3.16/Modules/FindPkgConfig.cmake:463 (message):
A required package was not found
Call Stack (most recent call first):
/usr/share/cmake-3.16/Modules/FindPkgConfig.cmake:643 (_pkg_check_modules_internal)
src/CMakeLists.txt:29 (pkg_check_modules)

ā€“ Configuring incomplete, errors occurred!
See also ā€œ/home/systemuser/source/CMakeFiles/CMakeOutput.logā€.
See also ā€œ/home/systemuser/source/CMakeFiles/CMakeError.logā€.

libgvm_base is present:

systemuser@ubuntutemp:~/source$ locate libgvm_base
/home/systemuser/build/gvm-libs/base/libgvm_base.so
/home/systemuser/build/gvm-libs/base/libgvm_base.so.21
/home/systemuser/build/gvm-libs/base/libgvm_base.so.21.4.4
/home/systemuser/build/gvm-libs/libgvm_base.pc
/home/systemuser/source/gvm-libs-21.4.4/base/libgvm_base.pc.in
/opt/gvm/gvm-libs-21.4.3/base/libgvm_base.pc.in
/opt/gvm/gvm-libs-21.4.3/build/base/libgvm_base.so
/opt/gvm/gvm-libs-21.4.3/build/base/libgvm_base.so.21
/opt/gvm/gvm-libs-21.4.3/build/base/libgvm_base.so.21.4.3
/opt/gvm/gvm-libs-21.4.3/build/libgvm_base.pc
/opt/gvm/lib/libgvm_base.so
/opt/gvm/lib/libgvm_base.so.21
/opt/gvm/lib/libgvm_base.so.21.4.3
/opt/gvm/lib/pkgconfig/libgvm_base.pc
/opt/lib/libgvm_base.so
/opt/lib/libgvm_base.so.21
/opt/lib/libgvm_base.so.21.4.4
/opt/lib/pkgconfig/libgvm_base.pc

For the records:

As the question was asked in two different topics at the same time an answer was given in the second topic at:

1 Like