Error while running the openVAS scanner commands

I am trying to automate the OpenVAS scanning system for anyone to run the tool on need basis. To set up the server, I have already completed installing the web application using the Container installation step in Greenbone Community Containers 22.4 - Greenbone Community Documentation

As part of this process, I have tried running the below commands and attaching the console logs of those commands. I am trying to run the scanner through the command line from a laptop without doing any ssh to the application where the application is hosted.

Can you please help me with next steps or fixing the issue that I did not fix during the installation or so?

apt install -y gvm
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  libblas3 libjemalloc2 liblinear4 liblua5.1-0 liblzf1 lua-bitop lua-cjson lua-lpeg nmap nmap-common openvas-scanner ospd-openvas python-babel-localedata python3-babel
  python3-deprecated python3-dnspython python3-flask python3-impacket python3-itsdangerous python3-jinja2 python3-ldap3 python3-ldapdomaindump python3-openssl
  python3-ospd python3-packaging python3-psutil python3-pyasn1 python3-pycryptodome python3-pyinotify python3-redis python3-requests-toolbelt python3-simplejson
  python3-werkzeug python3-wrapt redis-server redis-tools
Suggested packages:
  liblinear-tools liblinear-dev ncat ndiff zenmap snmp pnscan strobe ike-scan python3-sniffio python3-trio python3-asgiref python-flask-doc python-jinja2-doc
  python-openssl-doc python3-openssl-dbg python-psutil-doc python-pyinotify-doc python3-hiredis ipython3 python-werkzeug-doc python3-watchdog ruby-redis
Recommended packages:
  greenbone-security-assistant
The following NEW packages will be installed:
  gvm libblas3 libjemalloc2 liblinear4 liblua5.1-0 liblzf1 lua-bitop lua-cjson lua-lpeg nmap nmap-common openvas-scanner ospd-openvas python-babel-localedata
  python3-babel python3-deprecated python3-dnspython python3-flask python3-impacket python3-itsdangerous python3-jinja2 python3-ldap3 python3-ldapdomaindump
  python3-openssl python3-ospd python3-packaging python3-psutil python3-pyasn1 python3-pycryptodome python3-pyinotify python3-redis python3-requests-toolbelt
  python3-simplejson python3-werkzeug python3-wrapt redis-server redis-tools
0 upgraded, 37 newly installed, 0 to remove and 217 not upgraded.
Need to get 15.9 MB of archives.
After this operation, 79.2 MB of additional disk space will be used.
Get:1 http://in.archive.ubuntu.com/ubuntu jammy/universe amd64 libjemalloc2 amd64 5.2.1-4ubuntu1 [240 kB]
Get:2 http://in.archive.ubuntu.com/ubuntu jammy/universe amd64 liblua5.1-0 amd64 5.1.5-8.1build4 [99.9 kB]
Get:3 http://in.archive.ubuntu.com/ubuntu jammy/universe amd64 liblzf1 amd64 3.6-3 [7,444 B]
Get:4 http://in.archive.ubuntu.com/ubuntu jammy/universe amd64 lua-bitop amd64 1.0.2-5 [6,680 B]
Get:5 http://in.archive.ubuntu.com/ubuntu jammy/universe amd64 lua-cjson amd64 2.1.0+dfsg-2.1 [17.4 kB]
Get:6 http://in.archive.ubuntu.com/ubuntu jammy/universe amd64 redis-tools amd64 5:6.0.16-1ubuntu1 [856 kB]
Get:7 http://in.archive.ubuntu.com/ubuntu jammy/universe amd64 redis-server amd64 5:6.0.16-1ubuntu1 [45.9 kB]
Get:8 http://in.archive.ubuntu.com/ubuntu jammy/universe amd64 openvas-scanner amd64 21.4.3-1 [290 kB]
Get:9 http://in.archive.ubuntu.com/ubuntu jammy/main amd64 python3-wrapt amd64 1.13.3-1build1 [34.0 kB]
Get:10 http://in.archive.ubuntu.com/ubuntu jammy/universe amd64 python3-deprecated all 1.2.13-2 [9,804 B]
Get:11 http://in.archive.ubuntu.com/ubuntu jammy/main amd64 python3-psutil amd64 5.9.0-1build1 [158 kB]
Get:12 http://in.archive.ubuntu.com/ubuntu jammy/universe amd64 python3-ospd all 21.4.4-1 [61.2 kB]
Get:13 http://in.archive.ubuntu.com/ubuntu jammy/main amd64 python3-packaging all 21.3-1 [30.7 kB]
Get:14 http://in.archive.ubuntu.com/ubuntu jammy/main amd64 python3-redis all 3.5.3-2 [60.8 kB]
Get:15 http://in.archive.ubuntu.com/ubuntu jammy/universe amd64 ospd-openvas all 21.4.3-1 [41.6 kB]
Get:16 http://in.archive.ubuntu.com/ubuntu jammy/universe amd64 gvm all 21.4.3 [10.8 kB]
Get:17 http://in.archive.ubuntu.com/ubuntu jammy/main amd64 libblas3 amd64 3.10.0-2ubuntu1 [228 kB]
Get:18 http://in.archive.ubuntu.com/ubuntu jammy/universe amd64 liblinear4 amd64 2.3.0+dfsg-5 [41.4 kB]
Get:19 http://in.archive.ubuntu.com/ubuntu jammy/universe amd64 lua-lpeg amd64 1.0.2-1 [31.4 kB]
Get:20 http://in.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 nmap-common all 7.91+dfsg1+really7.80+dfsg1-2ubuntu0.1 [3,940 kB]
Get:21 http://in.archive.ubuntu.com/ubuntu jammy/main amd64 python-babel-localedata all 2.8.0+dfsg.1-7 [4,982 kB]
Get:22 http://in.archive.ubuntu.com/ubuntu jammy/main amd64 python3-babel all 2.8.0+dfsg.1-7 [85.1 kB]
Get:23 http://in.archive.ubuntu.com/ubuntu jammy/main amd64 python3-dnspython all 2.1.0-1ubuntu1 [123 kB]
Get:24 http://in.archive.ubuntu.com/ubuntu jammy/main amd64 python3-itsdangerous all 2.1.0-1 [14.7 kB]
Get:25 http://in.archive.ubuntu.com/ubuntu jammy/main amd64 python3-jinja2 all 3.0.3-1 [108 kB]
Get:26 http://in.archive.ubuntu.com/ubuntu jammy-updates/main amd64 python3-werkzeug all 2.0.2+dfsg1-1ubuntu0.22.04.1 [181 kB]
Get:27 http://in.archive.ubuntu.com/ubuntu jammy-updates/main amd64 python3-flask all 2.0.1-2ubuntu1.1 [81.5 kB]
Get:28 http://in.archive.ubuntu.com/ubuntu jammy/main amd64 python3-pyasn1 all 0.4.8-1 [50.9 kB]
Get:29 http://in.archive.ubuntu.com/ubuntu jammy/universe amd64 python3-ldap3 all 2.8.1-1 [229 kB]
Get:30 http://in.archive.ubuntu.com/ubuntu jammy/universe amd64 python3-ldapdomaindump all 0.9.3-1 [16.5 kB]
Get:31 http://in.archive.ubuntu.com/ubuntu jammy/main amd64 python3-openssl all 21.0.0-1 [45.2 kB]
Get:32 http://in.archive.ubuntu.com/ubuntu jammy/main amd64 python3-pycryptodome amd64 3.11.0+dfsg1-3build1 [1,027 kB]
Get:33 http://in.archive.ubuntu.com/ubuntu jammy/universe amd64 python3-impacket all 0.9.24-1 [910 kB]
Get:34 http://in.archive.ubuntu.com/ubuntu jammy/main amd64 python3-pyinotify all 0.9.6-1.3 [24.8 kB]
Get:35 http://in.archive.ubuntu.com/ubuntu jammy/main amd64 python3-requests-toolbelt all 0.9.1-1 [38.0 kB]
Get:36 http://in.archive.ubuntu.com/ubuntu jammy/main amd64 python3-simplejson amd64 3.17.6-1build1 [54.7 kB]
Get:37 http://in.archive.ubuntu.com/ubuntu jammy-updates/universe amd64 nmap amd64 7.91+dfsg1+really7.80+dfsg1-2ubuntu0.1 [1,731 kB]
Fetched 15.9 MB in 10s (1,618 kB/s)
Extracting templates from packages: 100%
Selecting previously unselected package libjemalloc2:amd64.
(Reading database ... 246720 files and directories currently installed.)
Preparing to unpack .../00-libjemalloc2_5.2.1-4ubuntu1_amd64.deb ...
Unpacking libjemalloc2:amd64 (5.2.1-4ubuntu1) ...
Selecting previously unselected package liblua5.1-0:amd64.
Preparing to unpack .../01-liblua5.1-0_5.1.5-8.1build4_amd64.deb ...
Unpacking liblua5.1-0:amd64 (5.1.5-8.1build4) ...
Selecting previously unselected package liblzf1:amd64.
Preparing to unpack .../02-liblzf1_3.6-3_amd64.deb ...
Unpacking liblzf1:amd64 (3.6-3) ...
Selecting previously unselected package lua-bitop:amd64.
Preparing to unpack .../03-lua-bitop_1.0.2-5_amd64.deb ...
Unpacking lua-bitop:amd64 (1.0.2-5) ...
Selecting previously unselected package lua-cjson:amd64.
Preparing to unpack .../04-lua-cjson_2.1.0+dfsg-2.1_amd64.deb ...
Unpacking lua-cjson:amd64 (2.1.0+dfsg-2.1) ...
Selecting previously unselected package redis-tools.
Preparing to unpack .../05-redis-tools_5%3a6.0.16-1ubuntu1_amd64.deb ...
Unpacking redis-tools (5:6.0.16-1ubuntu1) ...
Selecting previously unselected package redis-server.
Preparing to unpack .../06-redis-server_5%3a6.0.16-1ubuntu1_amd64.deb ...
Unpacking redis-server (5:6.0.16-1ubuntu1) ...
Selecting previously unselected package openvas-scanner.
Preparing to unpack .../07-openvas-scanner_21.4.3-1_amd64.deb ...
Unpacking openvas-scanner (21.4.3-1) ...
Selecting previously unselected package python3-wrapt.
Preparing to unpack .../08-python3-wrapt_1.13.3-1build1_amd64.deb ...
Unpacking python3-wrapt (1.13.3-1build1) ...
Selecting previously unselected package python3-deprecated.
Preparing to unpack .../09-python3-deprecated_1.2.13-2_all.deb ...
Unpacking python3-deprecated (1.2.13-2) ...
Selecting previously unselected package python3-psutil.
Preparing to unpack .../10-python3-psutil_5.9.0-1build1_amd64.deb ...
Unpacking python3-psutil (5.9.0-1build1) ...
Selecting previously unselected package python3-ospd.
Preparing to unpack .../11-python3-ospd_21.4.4-1_all.deb ...
Unpacking python3-ospd (21.4.4-1) ...
Selecting previously unselected package python3-packaging.
Preparing to unpack .../12-python3-packaging_21.3-1_all.deb ...
Unpacking python3-packaging (21.3-1) ...
Selecting previously unselected package python3-redis.
Preparing to unpack .../13-python3-redis_3.5.3-2_all.deb ...
Unpacking python3-redis (3.5.3-2) ...
Selecting previously unselected package ospd-openvas.
Preparing to unpack .../14-ospd-openvas_21.4.3-1_all.deb ...
Unpacking ospd-openvas (21.4.3-1) ...
Selecting previously unselected package gvm.
Preparing to unpack .../15-gvm_21.4.3_all.deb ...
Unpacking gvm (21.4.3) ...
Selecting previously unselected package libblas3:amd64.
Preparing to unpack .../16-libblas3_3.10.0-2ubuntu1_amd64.deb ...
Unpacking libblas3:amd64 (3.10.0-2ubuntu1) ...
Selecting previously unselected package liblinear4:amd64.
Preparing to unpack .../17-liblinear4_2.3.0+dfsg-5_amd64.deb ...
Unpacking liblinear4:amd64 (2.3.0+dfsg-5) ...
Selecting previously unselected package lua-lpeg:amd64.
Preparing to unpack .../18-lua-lpeg_1.0.2-1_amd64.deb ...
Unpacking lua-lpeg:amd64 (1.0.2-1) ...
Selecting previously unselected package nmap-common.
Preparing to unpack .../19-nmap-common_7.91+dfsg1+really7.80+dfsg1-2ubuntu0.1_all.deb ...
Unpacking nmap-common (7.91+dfsg1+really7.80+dfsg1-2ubuntu0.1) ...
Selecting previously unselected package python-babel-localedata.
Preparing to unpack .../20-python-babel-localedata_2.8.0+dfsg.1-7_all.deb ...
Unpacking python-babel-localedata (2.8.0+dfsg.1-7) ...
Selecting previously unselected package python3-babel.
Preparing to unpack .../21-python3-babel_2.8.0+dfsg.1-7_all.deb ...
Unpacking python3-babel (2.8.0+dfsg.1-7) ...
Selecting previously unselected package python3-dnspython.
Preparing to unpack .../22-python3-dnspython_2.1.0-1ubuntu1_all.deb ...
Unpacking python3-dnspython (2.1.0-1ubuntu1) ...
Selecting previously unselected package python3-itsdangerous.
Preparing to unpack .../23-python3-itsdangerous_2.1.0-1_all.deb ...
Unpacking python3-itsdangerous (2.1.0-1) ...
Selecting previously unselected package python3-jinja2.
Preparing to unpack .../24-python3-jinja2_3.0.3-1_all.deb ...
Unpacking python3-jinja2 (3.0.3-1) ...
Selecting previously unselected package python3-werkzeug.
Preparing to unpack .../25-python3-werkzeug_2.0.2+dfsg1-1ubuntu0.22.04.1_all.deb ...
Unpacking python3-werkzeug (2.0.2+dfsg1-1ubuntu0.22.04.1) ...
Selecting previously unselected package python3-flask.
Preparing to unpack .../26-python3-flask_2.0.1-2ubuntu1.1_all.deb ...
Unpacking python3-flask (2.0.1-2ubuntu1.1) ...
Selecting previously unselected package python3-pyasn1.
Preparing to unpack .../27-python3-pyasn1_0.4.8-1_all.deb ...
Unpacking python3-pyasn1 (0.4.8-1) ...
Selecting previously unselected package python3-ldap3.
Preparing to unpack .../28-python3-ldap3_2.8.1-1_all.deb ...
Unpacking python3-ldap3 (2.8.1-1) ...
Selecting previously unselected package python3-ldapdomaindump.
Preparing to unpack .../29-python3-ldapdomaindump_0.9.3-1_all.deb ...
Unpacking python3-ldapdomaindump (0.9.3-1) ...
Selecting previously unselected package python3-openssl.
Preparing to unpack .../30-python3-openssl_21.0.0-1_all.deb ...
Unpacking python3-openssl (21.0.0-1) ...
Selecting previously unselected package python3-pycryptodome.
Preparing to unpack .../31-python3-pycryptodome_3.11.0+dfsg1-3build1_amd64.deb ...
Unpacking python3-pycryptodome (3.11.0+dfsg1-3build1) ...
Selecting previously unselected package python3-impacket.
Preparing to unpack .../32-python3-impacket_0.9.24-1_all.deb ...
Unpacking python3-impacket (0.9.24-1) ...
Selecting previously unselected package python3-pyinotify.
Preparing to unpack .../33-python3-pyinotify_0.9.6-1.3_all.deb ...
Unpacking python3-pyinotify (0.9.6-1.3) ...
Selecting previously unselected package python3-requests-toolbelt.
Preparing to unpack .../34-python3-requests-toolbelt_0.9.1-1_all.deb ...
Unpacking python3-requests-toolbelt (0.9.1-1) ...
Selecting previously unselected package python3-simplejson.
Preparing to unpack .../35-python3-simplejson_3.17.6-1build1_amd64.deb ...
Unpacking python3-simplejson (3.17.6-1build1) ...
Selecting previously unselected package nmap.
Preparing to unpack .../36-nmap_7.91+dfsg1+really7.80+dfsg1-2ubuntu0.1_amd64.deb ...
Unpacking nmap (7.91+dfsg1+really7.80+dfsg1-2ubuntu0.1) ...
Setting up lua-lpeg:amd64 (1.0.2-1) ...
Setting up python3-requests-toolbelt (0.9.1-1) ...
Setting up python3-openssl (21.0.0-1) ...
Setting up python3-pycryptodome (3.11.0+dfsg1-3build1) ...
Setting up python3-pyinotify (0.9.6-1.3) ...
Setting up python3-itsdangerous (2.1.0-1) ...
Setting up libjemalloc2:amd64 (5.2.1-4ubuntu1) ...
Setting up python3-psutil (5.9.0-1build1) ...
Setting up python-babel-localedata (2.8.0+dfsg.1-7) ...
Setting up python3-simplejson (3.17.6-1build1) ...
Setting up libblas3:amd64 (3.10.0-2ubuntu1) ...
update-alternatives: using /usr/lib/x86_64-linux-gnu/blas/libblas.so.3 to provide /usr/lib/x86_64-linux-gnu/libblas.so.3 (libblas.so.3-x86_64-linux-gnu) in auto mode
Setting up python3-packaging (21.3-1) ...
Setting up lua-cjson:amd64 (2.1.0+dfsg-2.1) ...
Setting up python3-werkzeug (2.0.2+dfsg1-1ubuntu0.22.04.1) ...
Setting up liblzf1:amd64 (3.6-3) ...
Setting up python3-wrapt (1.13.3-1build1) ...
Setting up python3-redis (3.5.3-2) ...
Setting up lua-bitop:amd64 (1.0.2-5) ...
Setting up nmap-common (7.91+dfsg1+really7.80+dfsg1-2ubuntu0.1) ...
Setting up python3-dnspython (2.1.0-1ubuntu1) ...
Setting up liblua5.1-0:amd64 (5.1.5-8.1build4) ...
Setting up python3-pyasn1 (0.4.8-1) ...
Setting up python3-deprecated (1.2.13-2) ...
Setting up python3-babel (2.8.0+dfsg.1-7) ...
update-alternatives: using /usr/bin/pybabel-python3 to provide /usr/bin/pybabel (pybabel) in auto mode
Setting up python3-ldap3 (2.8.1-1) ...
Setting up liblinear4:amd64 (2.3.0+dfsg-5) ...
Setting up python3-jinja2 (3.0.3-1) ...
Setting up redis-tools (5:6.0.16-1ubuntu1) ...
Setting up python3-ospd (21.4.4-1) ...
Setting up python3-ldapdomaindump (0.9.3-1) ...
Setting up python3-flask (2.0.1-2ubuntu1.1) ...
Setting up nmap (7.91+dfsg1+really7.80+dfsg1-2ubuntu0.1) ...
Setting up redis-server (5:6.0.16-1ubuntu1) ...
Created symlink /etc/systemd/system/redis.service → /lib/systemd/system/redis-server.service.
Created symlink /etc/systemd/system/multi-user.target.wants/redis-server.service → /lib/systemd/system/redis-server.service.
Setting up python3-impacket (0.9.24-1) ...
Setting up openvas-scanner (21.4.3-1) ...
Setting up ospd-openvas (21.4.3-1) ...
Created symlink /etc/systemd/system/multi-user.target.wants/ospd-openvas.service → /lib/systemd/system/ospd-openvas.service.
Could not execute systemctl:  at /usr/bin/deb-systemd-invoke line 142.
Setting up gvm (21.4.3) ...
Processing triggers for doc-base (0.11.1) ...
Processing 1 added doc-base file...
Processing triggers for libc-bin (2.35-0ubuntu3.4) ...
Processing triggers for man-db (2.10.2-1) ...


~# gvm-setup

[>] Starting PostgreSQL service

[>] Creating GVM's certificate files

[>] Creating PostgreSQL database
could not change directory to "/root": Permission denied

[*] Creating database user
could not change directory to "/root": Permission denied
could not change directory to "/root": Permission denied

[*] Creating database
could not change directory to "/root": Permission denied
could not change directory to "/root": Permission denied

[*] Creating permissions
could not change directory to "/root": Permission denied
CREATE ROLE

[*] Applying permissions
could not change directory to "/root": Permission denied
GRANT ROLE
could not change directory to "/root": Permission denied

[*] Creating extension uuid-ossp
could not change directory to "/root": Permission denied
CREATE EXTENSION
could not change directory to "/root": Permission denied

[*] Creating extension pgcrypto
could not change directory to "/root": Permission denied
CREATE EXTENSION
[>] Migrating database
[>] Checking for GVM admin user
[*] Creating user admin for gvm
[*] Please note the generated admin password
[*] User created with password '***********'.
could not change directory to "/root": Permission denied
[*] Define Feed Import Owner
[>] Updating GVM feeds
[*] Updating NVT (Network Vulnerability Tests feed from Greenbone Security Feed/Community Feed)
Trying to acquire lock on /var/lib/openvas/feed-update.lock
Acquired lock on /var/lib/openvas/feed-update.lock
⠋ Downloading Notus files from rsync://feed.community.greenbone.net/community/vulnerability-feed/22.04/vt-data/notus/ to /var/lib/notus
Releasing lock on /var/lib/openvas/feed-update.lock
Traceback (most recent call last):
  File "/usr/local/bin/greenbone-nvt-sync", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.10/dist-packages/greenbone/feed/sync/main.py", line 235, in main
    sys.exit(asyncio.run(feed_sync(console, error_console)))
  File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
    return future.result()
  File "/usr/local/lib/python3.10/dist-packages/greenbone/feed/sync/main.py", line 211, in feed_sync
    await rsync_coro
  File "/usr/local/lib/python3.10/dist-packages/greenbone/feed/sync/rsync.py", line 82, in sync
    destination.mkdir(parents=True, exist_ok=True)
  File "/usr/lib/python3.10/pathlib.py", line 1175, in mkdir
    self._accessor.mkdir(self, mode)
PermissionError: [Errno 13] Permission denied: '/var/lib/notus'
[>] Updating Vulnerability Tests info into Redis store from VT files
openvas: error while loading shared libraries: libopenvas_nasl.so.21: cannot open shared object file: No such file or directory
[*] Updating GVMD Data
Trying to acquire lock on /var/lib/gvm/feed-update.lock
Acquired lock on /var/lib/gvm/feed-update.lock
⠴ Downloading gvmd data from rsync://feed.community.greenbone.net/community/data-feed/22.04/ to /var/lib/gvm/data-objects/gvmd/22.04
Releasing lock on /var/lib/gvm/feed-update.lock

[*] Updating Scap Data
Trying to acquire lock on /var/lib/gvm/feed-update.lock
Acquired lock on /var/lib/gvm/feed-update.lock
⠇ Downloading SCAP data from rsync://feed.community.greenbone.net/community/vulnerability-feed/22.04/scap-data/ to /var/lib/gvm/scap-data
Releasing lock on /var/lib/gvm/feed-update.lock

[*] Updating Cert Data
Trying to acquire lock on /var/lib/gvm/feed-update.lock
Acquired lock on /var/lib/gvm/feed-update.lock
⠇ Downloading CERT-Bund data from rsync://feed.community.greenbone.net/community/vulnerability-feed/22.04/cert-data/ to /var/lib/gvm/cert-data
Releasing lock on /var/lib/gvm/feed-update.lock


[+] GVM feeds updated
[*] Checking Default scanner
[*] Modifying Default Scanner
Scanner modified.

[+] Done
[*] Please note the password for the admin user
[*] User created with password '**************'.

[>] You can now run gvm-check-setup to make sure everything is correctly configured


~# gvm-check-setup
gvm-check-setup 21.4.3
  Test completeness and readiness of GVM-21.4.3
Step 1: Checking OpenVAS (Scanner)...
        ERROR: No OpenVAS Scanner found.
        FIX: Please install OpenVAS Scanner.

 ERROR: Your GVM-21.4.3 installation is not yet complete!

Please follow the instructions marked with FIX above and run this
script again.


~# apt-get update
Get:1 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
Hit:2 http://in.archive.ubuntu.com/ubuntu jammy InRelease
Get:3 http://in.archive.ubuntu.com/ubuntu jammy-updates InRelease [119 kB]
Hit:4 http://in.archive.ubuntu.com/ubuntu jammy-backports InRelease
Fetched 229 kB in 7s (33.5 kB/s)
Reading package lists... Done


~# apt-get install openvas -y
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  openvas
0 upgraded, 1 newly installed, 0 to remove and 217 not upgraded.
Need to get 1,658 B of archives.
After this operation, 12.3 kB of additional disk space will be used.
Get:1 http://in.archive.ubuntu.com/ubuntu jammy/universe amd64 openvas all 21.4.3 [1,658 B]
Fetched 1,658 B in 4s (369 B/s)
Selecting previously unselected package openvas.
(Reading database ... 249912 files and directories currently installed.)
Preparing to unpack .../openvas_21.4.3_all.deb ...
Unpacking openvas (21.4.3) ...
Setting up openvas (21.4.3) ...



~# gvm-check-setup
gvm-check-setup 21.4.3
  Test completeness and readiness of GVM-21.4.3
Step 1: Checking OpenVAS (Scanner)...
        ERROR: No OpenVAS Scanner found.
        FIX: Please install OpenVAS Scanner.

 ERROR: Your GVM-21.4.3 installation is not yet complete!

Please follow the instructions marked with FIX above and run this
script again.


~# gvm-setup

[>] Starting PostgreSQL service

[>] Creating GVM's certificate files

[>] Creating PostgreSQL database
could not change directory to "/root": Permission denied
[i] User _gvm already exists in PostgreSQL
could not change directory to "/root": Permission denied
[i] Database gvmd already exists in PostgreSQL
could not change directory to "/root": Permission denied
[i] Role DBA already exists in PostgreSQL

[*] Applying permissions
could not change directory to "/root": Permission denied
NOTICE:  role "_gvm" is already a member of role "dba"
GRANT ROLE
could not change directory to "/root": Permission denied
[i] Extension uuid-ossp already exists for gvmd database
could not change directory to "/root": Permission denied
[i] Extension pgcrypto already exists for gvmd database
[>] Migrating database
[>] Checking for GVM admin user
could not change directory to "/root": Permission denied
[>] Updating GVM feeds
[*] Updating NVT (Network Vulnerability Tests feed from Greenbone Security Feed/Community Feed)
Trying to acquire lock on /var/lib/openvas/feed-update.lock
Acquired lock on /var/lib/openvas/feed-update.lock
⠋ Downloading Notus files from rsync://feed.community.greenbone.net/community/vulnerability-feed/22.04/vt-data/notus/ to /var/lib/notus
Releasing lock on /var/lib/openvas/feed-update.lock
Traceback (most recent call last):
  File "/usr/local/bin/greenbone-nvt-sync", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.10/dist-packages/greenbone/feed/sync/main.py", line 235, in main
    sys.exit(asyncio.run(feed_sync(console, error_console)))
  File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
    return loop.run_until_complete(main)
  File "/usr/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
    return future.result()
  File "/usr/local/lib/python3.10/dist-packages/greenbone/feed/sync/main.py", line 211, in feed_sync
    await rsync_coro
  File "/usr/local/lib/python3.10/dist-packages/greenbone/feed/sync/rsync.py", line 82, in sync
    destination.mkdir(parents=True, exist_ok=True)
  File "/usr/lib/python3.10/pathlib.py", line 1175, in mkdir
    self._accessor.mkdir(self, mode)
PermissionError: [Errno 13] Permission denied: '/var/lib/notus'
[>] Updating Vulnerability Tests info into Redis store from VT files
openvas: error while loading shared libraries: libopenvas_nasl.so.21: cannot open shared object file: No such file or directory
[*] Updating GVMD Data
Trying to acquire lock on /var/lib/gvm/feed-update.lock
Acquired lock on /var/lib/gvm/feed-update.lock
⠴ Downloading gvmd data from rsync://feed.community.greenbone.net/community/data-feed/22.04/ to /var/lib/gvm/data-objects/gvmd/22.04
Releasing lock on /var/lib/gvm/feed-update.lock

[*] Updating Scap Data
Trying to acquire lock on /var/lib/gvm/feed-update.lock
Acquired lock on /var/lib/gvm/feed-update.lock
⠧ Downloading SCAP data from rsync://feed.community.greenbone.net/community/vulnerability-feed/22.04/scap-data/ to /var/lib/gvm/scap-data
Releasing lock on /var/lib/gvm/feed-update.lock

[*] Updating Cert Data
Trying to acquire lock on /var/lib/gvm/feed-update.lock
Acquired lock on /var/lib/gvm/feed-update.lock
⠦ Downloading CERT-Bund data from rsync://feed.community.greenbone.net/community/vulnerability-feed/22.04/cert-data/ to /var/lib/gvm/cert-data
Releasing lock on /var/lib/gvm/feed-update.lock


[+] GVM feeds updated
[*] Checking Default scanner
08b69003-5fc2-4037-a479-93b440211c73  OpenVAS  /run/ospd/ospd.sock  0  OpenVAS Default
[i] No need to alter default scanner

[+] Done
[i] Admin user already exists for GVM
[i] If you have forgotten it, you can change it. See gvmd manpage for more information

[>] You can now run gvm-check-setup to make sure everything is correctly configured

~# gvm-check-setup
gvm-check-setup 21.4.3
  Test completeness and readiness of GVM-21.4.3
Step 1: Checking OpenVAS (Scanner)...
        ERROR: No OpenVAS Scanner found.
        FIX: Please install OpenVAS Scanner.

 ERROR: Your GVM-21.4.3 installation is not yet complete!

Please follow the instructions marked with FIX above and run this
script again.
``

Hi,

I still don’t understand what you are trying to do. You set up the Greenbone Community Containers successfully but you don’t want to use them and instead install the Greenbone Community Edition from native Ubuntu packages?

So then why am I seeing the issue on running the shell script OpenVAS automation script. · GitHub which mentions the error as
omp: command not found ?

Can you help me here to understand what is a missing step? I am able to run the scans through GUI without any issues. But what is the pain point with command line executions?

If the process that I have done so far has some mistakes I wanted to get it fixed by the Greenbone team. How can we get such help from your end?

You didn’t really answer my question. What are you trying to archive?

If you want console access to the Greenbone Community Edition features by using our official containers take a look at Workflows - Greenbone Community Documentation

Personally I can’t understand why people like you are following some weird stuff they found on the internet and if that doesn’t work they are asking for help instead of reading the official documentation first. This isn’t an offense just an observation.

This is a random script from a random guy on the internet. It uses a non available and since several years replaced tool omp. omp even wont work with our current software because it uses an outdated API. Please forget about it completely. We have gvm-tools instead nowadays.

You get help in this forum on a volunteering basis. You wont get personal support in time for your specific issue. Just to be clear. If you need something like that you must buy one of our products which come with warranty and direct support.

2 Likes

Sure. Thanks. I will try from my end and see if I can get through the issues that I am facing.