Having issues finding libgvm_base

Build and install OpenVAS scanner;

cd …/…/openvas

Proceed to build and install openvas.

mkdir build cd build cmake … -DCMAKE_INSTALL_PREFIX=/opt/gvm make make install

– Configuring incomplete, errors occurred!
See also “/tmp/gvm-source/openvas/build/CMakeFiles/CMakeOutput.log”.
root@ip-172-31-77-156:/tmp/gvm-source/openvas/build# export PKG_CONFIG_PATH=/opt/gvmd/lib/pkgconfig
root@ip-172-31-77-156:/tmp/gvm-source/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.10/Modules/FindPkgConfig.cmake:415 (message):
A required package was not found
Call Stack (most recent call first):
/usr/share/cmake-3.10/Modules/FindPkgConfig.cmake:593 (_pkg_check_modules_internal)
misc/CMakeLists.txt:31 (pkg_check_modules)

– Configuring incomplete, errors occurred!
See also “/tmp/gvm-source/openvas/build/CMakeFiles/CMakeOutput.log”.

Your output says it all :wink: Just read it …
You need to install GVM Libs first:

1 Like

See Frequently Asked Questions (FAQ)

1 Like

GVM libs are installed. 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

Hi @juanmachado,

please don’t post the same message twice in two old topics for a new issue next time.

It seems your INSTALL_PREFIX is set to /opt/gvm. In that case you need to adjust the pkg-config search path by setting the environment variable PKG_CONFIG_PATH to /opt/gvm/pkgconfig.

Btw. when building from source it is best to follow our guide at https://greenbone.github.io/docs/
If you don’t know all the details of the build toolchain (for example how executables are found, linked and loaded) it is very very difficult to fix issues like this. And you WILL run in such issues again!

3 Likes

I am sorry, I think I posted twice by mistake. It won’t happen again.

I built an Ubuntu box from scratch and followed the guideline from https://greenbone.github.io/docs/gvm-21.04/index.html. Only difference is Ubuntu will install postgres14 by default, so I installed v13 to be in compliance with the guideline.

No errors until user creation.

I still can’t pass this part https://greenbone.github.io/docs/gvm-21.04/index.html#id109
creating the user doesn’t return anything and this is the output in /var/log/gvm/gvmd.log

md main:MESSAGE:2022-04-26 15h42.40 utc:2029: Greenbone Vulnerability Manager version 21.4.5 (DB revision 242)
md manage:WARNING:2022-04-26 15h42.40 utc:2029: Failed to open lock file ‘/run/gvmd/gvm-checking’: No such file or directory
md main:CRITICAL:2022-04-26 15h42.40 utc:2029: gvmd: Error trying to get checking lock

I think I found the issue. The permissions on /run/gvmd/ were set wrong after using the guideline. Thanks

2 Likes