Cannot build Openvas manager

I am trying to install OpenVas from source code. Had success with the libraries and the scanner, but for some reason does not work for the manager.

I am cloning the repository inside /usr/lib. Inside the gvmd folder I am creating dir build and enter it.

After performing cmake -DCMAKE_INSTALL_PREFIX=/opt/gvmd ..
I am getting this:

-- Configuring Greenbone Vulnerability Manager...
-- The C compiler identification is GNU 7.3.0
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
-- Found Git: /usr/bin/git (found version "2.17.1") 
-- Install prefix: /opt/gvmd
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Checking for module 'libgvm_base>=1.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)
  src/CMakeLists.txt:37 (pkg_check_modules)
  • Keep in mind that the gvm-libs is alsoinstalled under /usr/lib and inside it there is package ‘libgvm_base’.

Since I am not really familiar with installation from source code I maybe I have made a mistake somewhere.
But still do you have any idea why this is happening?

Any advice is much appreciated!!
Thanks :slight_smile:

pkg-config doesn’t find the installed .so libraries from gvm-libs. Try to set PKG_CONFIG_PATH like

export PKG_CONFIG_PATH=/opt/gvmd/lib/pkgconfig

and re-run cmake afterwards.

3 Likes