OpenVAS on Ubuntu 18.04: what's the correct way?

The problem is there is no official Openvas repositoy for Ubuntu. To get the deb, you need to use the non-official repository of mrazavi, which as explained below is not up to date and not very secure.

Having said that, on Ubuntu 18.04, if you want to compile the sources of Openvas, then you will need to install the following packages first:

sudo apt-get install libmicrohttpd-dev libxml2-dev libxslt1-dev cmake pkg-config libglib2.0-dev libgnutls28-dev uuid-dev libssh-gcrypt-dev libhiredis-dev xmltoman doxygen clang-format graphviz libpthread-stubs0-dev libpthread-workqueue-dev libpthread-workqueue0 locales-all libjson-perl gettext libmicrohttpd-dev libxml2-dev python-polib python-impacket gcc pkg-config libssh-gcrypt-dev libgnutls28-dev libglib2.0-dev libpcap-dev bison libksba-dev libgcrypt20-dev python-netsnmp heimdal-dev heimdal-multidev libpopt-dev libpopt0 gcc-mingw* libsqlite3-dev libpq-dev sqlite3 sqlfairy xsltproc libgd-graph-perl redis-server icu-devtools libicu-dev libmicrohttpd-dev python3-dev gnutls-bin libical-dev git libldap2-dev libsnmp-dev

Then:
sudo apt-get install libical2 libical2-dev libmicrohttpd12 libgpgme-dev libevent-core-1.4-2 libevent-core-2.1-6 bevent-pthreads-2.1-6

On top of this, if you plan to use PostgreSQL as the main database, you need to install:
sudo apt-get install postgresql postgresql-doc postgresql-server-dev-all

For gvm-tools you will need to do:
apt-get install python3-pip
pip3 install setuptools wheel
pip3 install gvm-tools

Then you can compile openvas packages from sources. This apply to the latest stable release (7.0.4) only. Also make sure you have enough free space and a good internet connection as the upon commands will download and install dozens of other packages not in the list…!

3 Likes