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