Closer to Successfull Installation on Linux Mint 20

Use this category only if you have build GVM from sources or if you use packages provided by a 3rdparty repository.

When posting you should provide information about your environment using the following template:

GVM versions

Installing OpenVAS Scanner : not installed yet.


Operating system: Linux Mint 20
Kernel: : Linux development-Macmini 5.4.0-88-generic #99-Ubuntu SMP Thu Sep 23 17:29:00 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Installation method / source: Source packages from GitHub: https:/ /

Hello. I wanted to install GVM on Linux Mint 20. I used the package manager, but GVM was not available only openvas. Upon installation, I had to use the openvas commands (openvas-setup) instead of the gvm commands (ex. gvm-setup), and the setup would not complete.

So, I wanted to build it from source. I was successfully able to build some components as such:

# Do a system update and upgrade
sudo apt update & apt upgrade

# Install some required packages
sudo apt install bison cmake gcc gcc-mingw-w64 heimdal-dev libgcrypt20-dev libglib2.0-dev libgnutls28-dev libgpgme-dev libhiredis-dev libksba-dev libmicrohttpd-dev git libpcap-dev libpopt-dev libsnmp-dev libsqlite3-dev libssh-gcrypt-dev xmltoman libxml2-dev perl-base pkg-config python3-paramiko python3-setuptools uuid-dev curl redis doxygen libical-dev gnutls-bin install libboost-tools-dev magics++ libboost-all-dev libnet1-dev libjson-glib-dev

# Install Yarn GPG Key
curl -sS https:/ / | apt-key add -
# Install the Yarn Repository
echo "deb https:/ / stable main" | tee /etc/apt/sources.list.d/yarn.list
# Install Yarn
sudo apt update & apt install yarn

# To make gvm-libs in Mint 20, you need to have the Paho MQTT C Client installed or else you will recieve an error:

fatal error: MQTTClient.h: No such file or directory
   28 | #include <MQTTClient.h>
      |          ^~~~~~~~~~~~~~
compilation terminated.

# Instructions are from: 
# https:/ /
apt install openssl libssl-dev
cd /usr/local/src
git clone https:/ /
cd paho.mqtt.c
make && sudo make install

# Install OpenVAS Scanner
cd openvas-scanner
mkdir build
cd build
cmake ..
make install
# FAILED!!!!

The build failed for openvas-smb and openvas-scanner. I’m not too worried about openvas-smb if I can use the other tools without it, since I do not use SMB or Samba. However, here is the error output from openvas-scanner.

Scanning dependencies of target openvas-nasl-lint
[ 77%] Building C object nasl/CMakeFiles/openvas-nasl-lint.dir/nasl-lint.c.o
[ 78%] Linking C executable openvas-nasl-lint
/usr/bin/ld: /usr/local/lib/ undefined reference to `MQTTClient_connect5'
/usr/bin/ld: /usr/local/lib/ undefined reference to `MQTTClient_publishMessage5'
/usr/bin/ld: /usr/local/lib/ undefined reference to `MQTTClient_freeMessage'
/usr/bin/ld: /usr/local/lib/ undefined reference to `MQTTClient_free'
/usr/bin/ld: /usr/local/lib/ undefined reference to `MQTTClient_createWithOptions'
/usr/bin/ld: /usr/local/lib/ undefined reference to `MQTTClient_waitForCompletion'
/usr/bin/ld: /usr/local/lib/ undefined reference to `MQTTProperties_free'
/usr/bin/ld: /usr/local/lib/ undefined reference to `MQTTClient_receive'
/usr/bin/ld: /usr/local/lib/ undefined reference to `MQTTClient_disconnect5'
/usr/bin/ld: /usr/local/lib/ undefined reference to `MQTTClient_subscribe5'
/usr/bin/ld: /usr/local/lib/ undefined reference to `MQTTClient_strerror'
/usr/bin/ld: /usr/local/lib/ undefined reference to `MQTTClient_destroy'
/usr/bin/ld: /usr/local/lib/ undefined reference to `MQTTClient_unsubscribe'
/usr/bin/ld: /usr/local/lib/ undefined reference to `MQTTResponse_free'
collect2: error: ld returned 1 exit status
make[2]: *** [nasl/CMakeFiles/openvas-nasl-lint.dir/build.make:86: nasl/openvas-nasl-lint] Error 1
make[1]: *** [CMakeFiles/Makefile2:312: nasl/CMakeFiles/openvas-nasl-lint.dir/all] Error 2
make: *** [Makefile:163: all] Error 2

It was going fine @78%, but seems that some problem referencing MQTTClient. ‘MQTTClient’ also caused a build error for gvm-libs, but I was able to finally install it from source via the instructions on: https:/ / and that gvm-libs make and make install worked after that.

Can anyone offer a suggestion for completing this build. I’m at a loss, since I have the MQTTClient installed. I have tried to restart and try again with no luck.

1 Like

Hi, you are using an unreleased version of our source code. Please never ever build from main branches. These are development branches and may break every day.

Please consider using Greenbone Source Edition – Documentation — Greenbone Documentation documentation for a source build.