yu210148/gvm_install

A script for debian? (GVM20)

Closed this issue · 18 comments

It would be possible to have a scrpt for a install on a debian? (kali maybe)
thank you mate

Hi there,

I took a look at doing this earlier today but just ended up breaking things. On a base Debian system I had to install sudo and add my user to the sudo group before running the script. I couldn't think of a way to have the script do it for us as it's needed to run the thing in the first place.

su apt install sudo usermod -aG sudo <username>

I then logged out and back in so that the group change would take effect.

Once that was done I was able to run the script up until line 107 which sets the path in the sudoer file. This is different on Debian because the /snap/bin path doesn't exist by default. So I replaced it with this:

ID=grep ^ID /etc/os-release | sed 's/ID=//g'`

if [ $ID = "debian" ]; then
sed 's/Defaults\s.*secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"/Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/gvm/sbin:/opt/gvm/bin"/g' /etc/sudoers | EDITOR='tee' visudo
else
sed 's/Defaults\s.*secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin"/Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/opt/gvm/sbin"/g' /etc/sudoers | EDITOR='tee' visudo
fi`

Then I must have done something silly because some of the rest of the commands that get added to the gvm user's .bashrc end up echoing to the screen rather than actually being run. I'll keep looking at it as time permits and let you know if I get something viable.

kev.

thank you for the reply, these are informations useful

Hi again,

I've got a version that at least completes on Debian in the 'issue17' branch. Once it does though, I'm running into the GMP service not running issue others have mentioned.

If you're able, could you give it a try and let me know how it goes?

After a minimal Debian install I installed sudo then did a 'sudo -i' followed by './gvm_install'. Be sure to check out the right branch though as I ran into that once while testing ;)

Thanks in advance.

kev.

at the moment i see two problems
1: i must modify the /usr/share/cmake-3.18/Modules/FindPostgreSQL.cmake then i build gvmd and modify the line

set(PostgreSQL_KNOWN_VERSIONS ${PostgreSQL_ADDITIONAL_VERSIONS}
    "12" "11" "10" "9.6" "9.5" "9.4" "9.3" "9.2" "9.1" "9.0" "8.4" "8.3" "8.2" "8.1" "8.0")

to

set(PostgreSQL_KNOWN_VERSIONS ${PostgreSQL_ADDITIONAL_VERSIONS}
   "13" "12" "11" "10" "9.6" "9.5" "9.4" "9.3" "9.2" "9.1" "9.0" "8.4" "8.3" "8.2" "8.1" "8.0")

2: when i compile the GSA, i have this problem not solved

[ 16%] Building C object gsad/src/CMakeFiles/gsad.dir/gsad.c.o
/opt/gvm/src/gsa/gsad/src/gsad.c: In function ‘start_unix_http_daemon’:
/opt/gvm/src/gsa/gsad/src/gsad.c:2567:20: error: passing argument 5 of ‘MHD_start_daemon’ from incompatible pointer type [-Werror=incompatible-pointer-types]
 2567 |     0, NULL, NULL, handler, http_handlers, MHD_OPTION_NOTIFY_COMPLETED,
      |                    ^~~~~~~
      |                    |
      |                    int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, size_t *, void **) {aka int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, long unsigned int *, void **)}
In file included from /opt/gvm/src/gsa/gsad/src/gsad_params.h:28,
                 from /opt/gvm/src/gsa/gsad/src/gsad_user.h:27,
                 from /opt/gvm/src/gsa/gsad/src/gsad_base.h:28,
                 from /opt/gvm/src/gsa/gsad/src/gsad.c:70:
/usr/include/microhttpd.h:2428:45: note: expected ‘MHD_AccessHandlerCallback’ {aka ‘enum MHD_Result (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, long unsigned int *, void **)’} but argument is of type ‘int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, size_t *, void **)’ {aka ‘int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, long unsigned int *, void **)’}
 2428 |                   MHD_AccessHandlerCallback dh, void *dh_cls,
      |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/opt/gvm/src/gsa/gsad/src/gsad.c: In function ‘start_http_daemon’:
/opt/gvm/src/gsa/gsad/src/gsad.c:2601:30: error: passing argument 5 of ‘MHD_start_daemon’ from incompatible pointer type [-Werror=incompatible-pointer-types]
 2601 |     flags, port, NULL, NULL, handler, http_handlers,
      |                              ^~~~~~~
      |                              |
      |                              int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, size_t *, void **) {aka int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, long unsigned int *, void **)}
In file included from /opt/gvm/src/gsa/gsad/src/gsad_params.h:28,
                 from /opt/gvm/src/gsa/gsad/src/gsad_user.h:27,
                 from /opt/gvm/src/gsa/gsad/src/gsad_base.h:28,
                 from /opt/gvm/src/gsa/gsad/src/gsad.c:70:
/usr/include/microhttpd.h:2428:45: note: expected ‘MHD_AccessHandlerCallback’ {aka ‘enum MHD_Result (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, long unsigned int *, void **)’} but argument is of type ‘int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, size_t *, void **)’ {aka ‘int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, long unsigned int *, void **)’}
 2428 |                   MHD_AccessHandlerCallback dh, void *dh_cls,
      |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/opt/gvm/src/gsa/gsad/src/gsad.c: In function ‘start_https_daemon’:
/opt/gvm/src/gsa/gsad/src/gsad.c:2633:30: error: passing argument 5 of ‘MHD_start_daemon’ from incompatible pointer type [-Werror=incompatible-pointer-types]
 2633 |     flags, port, NULL, NULL, &handle_request, http_handlers,
      |                              ^~~~~~~~~~~~~~~
      |                              |
      |                              int (*)(void *, http_connection_t *, const char *, const char *, const char *, const char *, size_t *, void **) {aka int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, long unsigned int *, void **)}
In file included from /opt/gvm/src/gsa/gsad/src/gsad_params.h:28,
                 from /opt/gvm/src/gsa/gsad/src/gsad_user.h:27,
                 from /opt/gvm/src/gsa/gsad/src/gsad_base.h:28,
                 from /opt/gvm/src/gsa/gsad/src/gsad.c:70:
/usr/include/microhttpd.h:2428:45: note: expected ‘MHD_AccessHandlerCallback’ {aka ‘enum MHD_Result (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, long unsigned int *, void **)’} but argument is of type ‘int (*)(void *, http_connection_t *, const char *, const char *, const char *, const char *, size_t *, void **)’ {aka ‘int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, long unsigned int *, void **)’}
 2428 |                   MHD_AccessHandlerCallback dh, void *dh_cls,
      |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~^~
cc1: all warnings being treated as errors
make[2]: *** [gsad/src/CMakeFiles/gsad.dir/build.make:82: gsad/src/CMakeFiles/gsad.dir/gsad.c.o] Errore 1
make[1]: *** [CMakeFiles/Makefile2:394: gsad/src/CMakeFiles/gsad.dir/all] Errore 2
make: *** [Makefile:149: all] Errore 2

here more info on the bug on kali https://gitlab.com/jeanfi/psensor/-/issues/24

but all without script, using manually every single line of the script, now i'll retry all (i'm using a VM kali 2020.3 with a snapshots)

I suspect there might be another issue with the script on kali as well. I've got it using /etc/os-release to determine if it's installing on Debian or something else (Ubuntu is assumed). I suspect the file on Kali will not be the same as on Debian so I'll spin up a Kali instance and adjust it.

kev.

I'm not sure that adding the additional version of postgresql to /usr/share/cmake-3.18/Modules/FindPostgreSQL.cmake would make much of a difference on Debian. The version of that file that I've got installed on my version of stable only goes up to 11 which matches the version in the repository. Kali may use a newer version though. I'll adjust when I get a Kali instance going.

kev.

I'm not sure that adding the additional version of postgresql to /usr/share/cmake-3.18/Modules/FindPostgreSQL.cmake would make much of a difference on Debian. The version of that file that I've got installed on my version of stable only goes up to 11 which matches the version in the repository. Kali may use a newer version though. I'll adjust when I get a Kali instance going.

kev.

maybe you have right, i'm tryng with a new istance and i don't need it

I didn't get a chance to set up a Kali instance today so I don't think it's going to work yet for you but if you want to try take a look at the ID value in /etc/os-release on Kali and change out 'debian' for whatever it says there in the 'if' statements in the script.

kev.

ok i'll try now

root@KaliGVM20:~# cat /etc/os-release 
PRETTY_NAME="Kali GNU/Linux Rolling"
NAME="Kali GNU/Linux"
ID=debian
VERSION="2020.4"
VERSION_ID="2020.4"
VERSION_CODENAME="kali-rolling"
ID_LIKE=debian
ANSI_COLOR="1;31"
HOME_URL="https://www.kali.org/"
SUPPORT_URL="https://forums.kali.org/"
BUG_REPORT_URL="https://bugs.kali.org/"

at the moment i see two problems
1: i must modify the /usr/share/cmake-3.18/Modules/FindPostgreSQL.cmake then i build gvmd and modify the line

set(PostgreSQL_KNOWN_VERSIONS ${PostgreSQL_ADDITIONAL_VERSIONS}
    "12" "11" "10" "9.6" "9.5" "9.4" "9.3" "9.2" "9.1" "9.0" "8.4" "8.3" "8.2" "8.1" "8.0")

to

set(PostgreSQL_KNOWN_VERSIONS ${PostgreSQL_ADDITIONAL_VERSIONS}
   "13" "12" "11" "10" "9.6" "9.5" "9.4" "9.3" "9.2" "9.1" "9.0" "8.4" "8.3" "8.2" "8.1" "8.0")

2: when i compile the GSA, i have this problem not solved

[ 16%] Building C object gsad/src/CMakeFiles/gsad.dir/gsad.c.o
/opt/gvm/src/gsa/gsad/src/gsad.c: In function ‘start_unix_http_daemon’:
/opt/gvm/src/gsa/gsad/src/gsad.c:2567:20: error: passing argument 5 of ‘MHD_start_daemon’ from incompatible pointer type [-Werror=incompatible-pointer-types]
 2567 |     0, NULL, NULL, handler, http_handlers, MHD_OPTION_NOTIFY_COMPLETED,
      |                    ^~~~~~~
      |                    |
      |                    int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, size_t *, void **) {aka int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, long unsigned int *, void **)}
In file included from /opt/gvm/src/gsa/gsad/src/gsad_params.h:28,
                 from /opt/gvm/src/gsa/gsad/src/gsad_user.h:27,
                 from /opt/gvm/src/gsa/gsad/src/gsad_base.h:28,
                 from /opt/gvm/src/gsa/gsad/src/gsad.c:70:
/usr/include/microhttpd.h:2428:45: note: expected ‘MHD_AccessHandlerCallback’ {aka ‘enum MHD_Result (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, long unsigned int *, void **)’} but argument is of type ‘int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, size_t *, void **)’ {aka ‘int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, long unsigned int *, void **)’}
 2428 |                   MHD_AccessHandlerCallback dh, void *dh_cls,
      |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/opt/gvm/src/gsa/gsad/src/gsad.c: In function ‘start_http_daemon’:
/opt/gvm/src/gsa/gsad/src/gsad.c:2601:30: error: passing argument 5 of ‘MHD_start_daemon’ from incompatible pointer type [-Werror=incompatible-pointer-types]
 2601 |     flags, port, NULL, NULL, handler, http_handlers,
      |                              ^~~~~~~
      |                              |
      |                              int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, size_t *, void **) {aka int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, long unsigned int *, void **)}
In file included from /opt/gvm/src/gsa/gsad/src/gsad_params.h:28,
                 from /opt/gvm/src/gsa/gsad/src/gsad_user.h:27,
                 from /opt/gvm/src/gsa/gsad/src/gsad_base.h:28,
                 from /opt/gvm/src/gsa/gsad/src/gsad.c:70:
/usr/include/microhttpd.h:2428:45: note: expected ‘MHD_AccessHandlerCallback’ {aka ‘enum MHD_Result (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, long unsigned int *, void **)’} but argument is of type ‘int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, size_t *, void **)’ {aka ‘int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, long unsigned int *, void **)’}
 2428 |                   MHD_AccessHandlerCallback dh, void *dh_cls,
      |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~^~
/opt/gvm/src/gsa/gsad/src/gsad.c: In function ‘start_https_daemon’:
/opt/gvm/src/gsa/gsad/src/gsad.c:2633:30: error: passing argument 5 of ‘MHD_start_daemon’ from incompatible pointer type [-Werror=incompatible-pointer-types]
 2633 |     flags, port, NULL, NULL, &handle_request, http_handlers,
      |                              ^~~~~~~~~~~~~~~
      |                              |
      |                              int (*)(void *, http_connection_t *, const char *, const char *, const char *, const char *, size_t *, void **) {aka int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, long unsigned int *, void **)}
In file included from /opt/gvm/src/gsa/gsad/src/gsad_params.h:28,
                 from /opt/gvm/src/gsa/gsad/src/gsad_user.h:27,
                 from /opt/gvm/src/gsa/gsad/src/gsad_base.h:28,
                 from /opt/gvm/src/gsa/gsad/src/gsad.c:70:
/usr/include/microhttpd.h:2428:45: note: expected ‘MHD_AccessHandlerCallback’ {aka ‘enum MHD_Result (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, long unsigned int *, void **)’} but argument is of type ‘int (*)(void *, http_connection_t *, const char *, const char *, const char *, const char *, size_t *, void **)’ {aka ‘int (*)(void *, struct MHD_Connection *, const char *, const char *, const char *, const char *, long unsigned int *, void **)’}
 2428 |                   MHD_AccessHandlerCallback dh, void *dh_cls,
      |                   ~~~~~~~~~~~~~~~~~~~~~~~~~~^~
cc1: all warnings being treated as errors
make[2]: *** [gsad/src/CMakeFiles/gsad.dir/build.make:82: gsad/src/CMakeFiles/gsad.dir/gsad.c.o] Errore 1
make[1]: *** [CMakeFiles/Makefile2:394: gsad/src/CMakeFiles/gsad.dir/all] Errore 2
make: *** [Makefile:149: all] Errore 2

here more info on the bug on kali https://gitlab.com/jeanfi/psensor/-/issues/24

but all without script, using manually every single line of the script, now i'll retry all (i'm using a VM kali 2020.3 with a snapshots)

the problem during the compile of gsa solved using "cmake .. -DCMAKE_INSTALL_PREFIX=/opt/gvm -DCMAKE_BUILD_TYPE=RELEASE"

ok i'll try now

root@KaliGVM20:~# cat /etc/os-release 
PRETTY_NAME="Kali GNU/Linux Rolling"
NAME="Kali GNU/Linux"
ID=debian
VERSION="2020.4"
VERSION_ID="2020.4"
VERSION_CODENAME="kali-rolling"
ID_LIKE=debian
ANSI_COLOR="1;31"
HOME_URL="https://www.kali.org/"
SUPPORT_URL="https://forums.kali.org/"
BUG_REPORT_URL="https://bugs.kali.org/"

Humm, that's odd. I just did a fresh install of kali 2020.4 and the "ID" string in os-release is "kali" rather than "debian". I'll stick an OR clause in the script to do the Debian modifications on either.

I also see that you're right about kali using postgres 13.

Hi again,

I'm afraid I've run into a bit of a problem trying to adapt this to Kali and I'm not sure what the solution or workaround is. When it tries to run the line

/usr/bin/python3 /opt/gvm/bin/ospd-openvas --pid-file /opt/gvm/var/run/ospd-openvas.pid --log-file /opt/gvm/var/log/gvm/ospd-openvas.log --lock-file-dir /opt/gvm/var/run -u /opt/gvm/var/run/ospd.sock

as the gvm user the Python3 interpreter is erroring with

Traceback (most recent call last):
File "/opt/gvm/bin/ospd-openvas", line 33, in
sys.exit(load_entry_point('ospd-openvas==1.0.1', 'console_scripts', 'ospd-openvas')())
File "/opt/gvm/bin/ospd-openvas", line 22, in importlib_load_entry_point
for entry_point in distribution(dist_name).entry_points
File "/usr/lib/python3.9/importlib/metadata.py", line 524, in distribution
return Distribution.from_name(distribution_name)
File "/usr/lib/python3.9/importlib/metadata.py", line 187, in from_name
raise PackageNotFoundError(name)
importlib.metadata.PackageNotFoundError: ospd-openvas

On Debian the command also appears to fail but it doesn't seem fatal as it does on Kali. Here's what it looks like on Debian

ERROR: get_db_connection: Not possible to run openvas. [Errno 2] No such file or directory: 'openvas': 'openvas'

Kali is using python 3.9 while Debian uses 3.7 so I think there's an issue with the ospd-openvas source that prevents it from working right on the newer version of Python3. Ubuntu uses version 3.8 and the last time I ran this there it didn't have this issue. It's also possible that the problem is in Python itself. Kali 2020.4 is using a release candidate version (3.9.1rc1) which hasn't been released officially yet according to python.org. It might be possible to downgrade Python3 to version 3.8 (or even 3.7) but that would be out of scope for an installer script.

So, I think we have to wait for an upstream fix to get this going on Kali.

I'll finish testing--still need to complete testing on Debian and try it on Ubuntu again to see if it breaks anything--and merge the changes I've got so far into the main branch. I've made a few changes that should allow it to run on Debian systems anyway.

kev.

Hi again,

I've merged the changes that at least allow the script to complete on Debian into the main branch. If anyone seeing this has any suggestions about the issue described above with Kali Linux let me know.

kev.

finish testing--still need to complete testing on Debian and try it on Ubuntu again to see if it breaks anything--and merge the changes I've got so far into the main branch. I've m

my personal test showed that with python3.9 (on a kali) we can find this error, but if i change with python3.8 (install python3.8-dev - python3-dev - python-dev, and next change the alias, "python --version" must be 3.8 default).

i'll retry all the procedure in the week-and, later i'll write here

Sounds good. Let me know how that goes.

i'll retry all procedure, i've install also "apt install psutils python3.8-dev -y" and modify the /usr/share/cmake-3.18/Modules/FindPostgreSQL.cmake becasue i'll find an error because i use postgresql version 13.

during the build of gsa i've used cmake .. -DCMAKE_INSTALL_PREFIX=/opt/gvm -DCMAKE_BUILD_TYPE=RELEASE (only in this case i've add "-DCMAKE_BUILD_TYPE=RELEASE")

i'bve change the default version of python in usew with

alias python='/usr/bin/python3.8'
alias python3='/usr/bin/python3.8'

build the scanner:

gvm@KaliGVM20:/opt/gvm/src$ cd /opt/gvm/src ;\
export PKG_CONFIG_PATH=/opt/gvm/lib/pkgconfig:$PKG_CONFIG_PATH ;\
virtualenv --python python3.8  /opt/gvm/bin/ospd-scanner/ ;\
source /opt/gvm/bin/ospd-scanner/bin/activate
(ospd-scanner) gvm@KaliGVM20:/opt/gvm/src$ mkdir /opt/gvm/var/run/ospd/ ;cd ospd ;pip3 install . ;cd /opt/gvm/src
mkdir: impossibile creare la directory "/opt/gvm/var/run/ospd/": File già esistente
Processing /opt/gvm/src/ospd
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Requirement already satisfied: lxml in /opt/gvm/bin/ospd-scanner/lib/python3.8/site-packages (from ospd==20.8.2.dev1) (4.6.2)
Collecting psutil
  Using cached psutil-5.7.3.tar.gz (465 kB)
Requirement already satisfied: deprecated in /opt/gvm/bin/ospd-scanner/lib/python3.8/site-packages (from ospd==20.8.2.dev1) (1.2.10)
Requirement already satisfied: defusedxml in /opt/gvm/bin/ospd-scanner/lib/python3.8/site-packages (from ospd==20.8.2.dev1) (0.6.0)
Requirement already satisfied: paramiko in /opt/gvm/bin/ospd-scanner/lib/python3.8/site-packages (from ospd==20.8.2.dev1) (2.7.2)
Requirement already satisfied: wrapt<2,>=1.10 in /opt/gvm/bin/ospd-scanner/lib/python3.8/site-packages (from deprecated->ospd==20.8.2.dev1) (1.12.1)
Requirement already satisfied: bcrypt>=3.1.3 in /opt/gvm/bin/ospd-scanner/lib/python3.8/site-packages (from paramiko->ospd==20.8.2.dev1) (3.2.0)
Requirement already satisfied: pynacl>=1.0.1 in /opt/gvm/bin/ospd-scanner/lib/python3.8/site-packages (from paramiko->ospd==20.8.2.dev1) (1.4.0)
Requirement already satisfied: cryptography>=2.5 in /opt/gvm/bin/ospd-scanner/lib/python3.8/site-packages (from paramiko->ospd==20.8.2.dev1) (3.3.1)
Requirement already satisfied: six>=1.4.1 in /opt/gvm/bin/ospd-scanner/lib/python3.8/site-packages (from bcrypt>=3.1.3->paramiko->ospd==20.8.2.dev1) (1.15.0)
Requirement already satisfied: cffi>=1.1 in /opt/gvm/bin/ospd-scanner/lib/python3.8/site-packages (from bcrypt>=3.1.3->paramiko->ospd==20.8.2.dev1) (1.14.4)
Requirement already satisfied: pycparser in /opt/gvm/bin/ospd-scanner/lib/python3.8/site-packages (from cffi>=1.1->bcrypt>=3.1.3->paramiko->ospd==20.8.2.dev1) (2.20)
Building wheels for collected packages: ospd, psutil
  Building wheel for ospd (PEP 517) ... done
  Created wheel for ospd: filename=ospd-20.8.2.dev1-py3-none-any.whl size=78971 sha256=d37f8e703ecbbeefddcae2543e0c0b6e10f11a4f531243bdb4a012beafbba1da
  Stored in directory: /tmp/pip-ephem-wheel-cache-12p6r105/wheels/9d/9f/4f/15b7c847113a47ff4b161eb8014917bb3f385738a9581435ea
  Building wheel for psutil (setup.py) ... done
  Created wheel for psutil: filename=psutil-5.7.3-cp38-cp38-linux_x86_64.whl size=277638 sha256=aca13e7f5b0c507c9c79e13e70e26a78acec66d2d4a1a465fcfa0643a89149c5
  Stored in directory: /opt/gvm/.cache/pip/wheels/f6/59/c2/38111ef4c354088a156bc95fbeb5396c0cac91a0f62f7158b9
Successfully built ospd psutil
Installing collected packages: psutil, ospd
Successfully installed ospd-20.8.2.dev1 psutil-5.7.3
(ospd-scanner) gvm@KaliGVM20:/opt/gvm/src$ cd ospd-openvas ;\
pip3 install . ;\
cd /opt/gvm/src
Processing /opt/gvm/src/ospd-openvas
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Requirement already satisfied: ospd>20.8.1 in /opt/gvm/bin/ospd-scanner/lib/python3.8/site-packages (from ospd-openvas==20.8.0) (20.8.2.dev1)
Requirement already satisfied: psutil in /opt/gvm/bin/ospd-scanner/lib/python3.8/site-packages (from ospd-openvas==20.8.0) (5.7.3)
Collecting packaging
  Downloading packaging-20.8-py2.py3-none-any.whl (39 kB)
Collecting redis>=3.0.1
  Downloading redis-3.5.3-py2.py3-none-any.whl (72 kB)
     |████████████████████████████████| 72 kB 825 kB/s 
Requirement already satisfied: deprecated in /opt/gvm/bin/ospd-scanner/lib/python3.8/site-packages (from ospd>20.8.1->ospd-openvas==20.8.0) (1.2.10)
Requirement already satisfied: lxml in /opt/gvm/bin/ospd-scanner/lib/python3.8/site-packages (from ospd>20.8.1->ospd-openvas==20.8.0) (4.6.2)
Requirement already satisfied: paramiko in /opt/gvm/bin/ospd-scanner/lib/python3.8/site-packages (from ospd>20.8.1->ospd-openvas==20.8.0) (2.7.2)
Requirement already satisfied: defusedxml in /opt/gvm/bin/ospd-scanner/lib/python3.8/site-packages (from ospd>20.8.1->ospd-openvas==20.8.0) (0.6.0)
Collecting pyparsing>=2.0.2
  Downloading pyparsing-2.4.7-py2.py3-none-any.whl (67 kB)
     |████████████████████████████████| 67 kB 3.3 MB/s 
Requirement already satisfied: wrapt<2,>=1.10 in /opt/gvm/bin/ospd-scanner/lib/python3.8/site-packages (from deprecated->ospd>20.8.1->ospd-openvas==20.8.0) (1.12.1)
Requirement already satisfied: cryptography>=2.5 in /opt/gvm/bin/ospd-scanner/lib/python3.8/site-packages (from paramiko->ospd>20.8.1->ospd-openvas==20.8.0) (3.3.1)
Requirement already satisfied: pynacl>=1.0.1 in /opt/gvm/bin/ospd-scanner/lib/python3.8/site-packages (from paramiko->ospd>20.8.1->ospd-openvas==20.8.0) (1.4.0)
Requirement already satisfied: bcrypt>=3.1.3 in /opt/gvm/bin/ospd-scanner/lib/python3.8/site-packages (from paramiko->ospd>20.8.1->ospd-openvas==20.8.0) (3.2.0)
Requirement already satisfied: six>=1.4.1 in /opt/gvm/bin/ospd-scanner/lib/python3.8/site-packages (from cryptography>=2.5->paramiko->ospd>20.8.1->ospd-openvas==20.8.0) (1.15.0)
Requirement already satisfied: cffi>=1.12 in /opt/gvm/bin/ospd-scanner/lib/python3.8/site-packages (from cryptography>=2.5->paramiko->ospd>20.8.1->ospd-openvas==20.8.0) (1.14.4)
Requirement already satisfied: pycparser in /opt/gvm/bin/ospd-scanner/lib/python3.8/site-packages (from cffi>=1.12->cryptography>=2.5->paramiko->ospd>20.8.1->ospd-openvas==20.8.0) (2.20)
Building wheels for collected packages: ospd-openvas
  Building wheel for ospd-openvas (PEP 517) ... done
  Created wheel for ospd-openvas: filename=ospd_openvas-20.8.0-py3-none-any.whl size=45660 sha256=2a92aae34e6216881463b3074c28ba2609c720430806296abae6f9f15755b3f8
  Stored in directory: /opt/gvm/.cache/pip/wheels/a8/ef/0b/7638f989bc77360859093158ec5a46d87cfee1c488c9c663c6
Successfully built ospd-openvas
Installing collected packages: pyparsing, packaging, redis, ospd-openvas
Successfully installed ospd-openvas-20.8.0 packaging-20.8 pyparsing-2.4.7 redis-3.5.3

and all fine...but the problem at the moment is when i star the service: (sorry, my kali is in italian, not english)

root@KaliGVM20:~# journalctl -xe
░░ Support: https://www.debian.org/support
░░ 
░░ Il riavvio automatico dell'unità gvmd.service è stato schedulato, come risultato
░░ delle impostazioni configurate in Restart=.
dic 18 16:03:05 KaliGVM20 systemd[1]: Stopped Open Vulnerability Assessment System Manager Daemon.
░░ Subject: L'unità gvmd.service ha terminato la fase di spegnimento
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ L'unità gvmd.service ha terminato la fase di spegnimento.
dic 18 16:03:05 KaliGVM20 systemd[1]: Starting Open Vulnerability Assessment System Manager Daemon...
░░ Subject: L'unità gvmd.service inizia la fase di avvio
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ L'unità gvmd.service ha iniziato la fase di avvio.
dic 18 16:03:05 KaliGVM20 systemd[1]: gvmd.service: Can't open PID file /opt/gvm/var/run/gvmd.pid (yet?) after start: Operation not permitted
dic 18 16:04:36 KaliGVM20 systemd[1]: gvmd.service: start operation timed out. Terminating.
dic 18 16:04:36 KaliGVM20 systemd[1]: gvmd.service: Failed with result 'timeout'.
░░ Subject: Unit fallita
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ Unità gvmd.service entrata nello stato 'failed' (fallito) con risultato 'timeout'.
dic 18 16:04:36 KaliGVM20 systemd[1]: Failed to start Open Vulnerability Assessment System Manager Daemon.
░░ Subject: L'unità gvmd.service è fallita
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ L'unità gvmd.service è fallita.
░░ 
░░ Il risultato è failed.

root@KaliGVM20:~# systemctl status gvmd.service 
● gvmd.service - Open Vulnerability Assessment System Manager Daemon
     Loaded: loaded (/etc/systemd/system/gvmd.service; enabled; vendor preset: disabled)
     Active: activating (auto-restart) (Result: timeout) since Fri 2020-12-18 16:11:37 CET; 1min 3s ago
       Docs: man:gvmd(8)
             https://www.greenbone.net
    Process: 75796 ExecStart=/opt/gvm/sbin/gvmd --osp-vt-update=/opt/gvm/var/run/ospd.sock (code=exited, status=0/SUCCESS)

I try to find why

gvmd log:

md manage:WARNING:2020-12-18 14h59.36 utc:75679: sqlv: sql_exec_internal failed
md   main:MESSAGE:2020-12-18 15h03.05 utc:75700:    Greenbone Vulnerability Manager version 20.08.0~git-c3857ab7-gvmd-20.08 (GIT revision c3857ab7-gvmd-20.08) (DB revision 233)
md manage:WARNING:2020-12-18 15h03.05 utc:75701: sql_exec_internal: PQexec failed: ERRORE:  libreria incompatibile "/opt/gvm/lib/libgvm-pg-server.so": versione non corrispondente
DETAIL:  La versione del server è 12, quella della libreria è 13.
 (7)
md manage:WARNING:2020-12-18 15h03.05 utc:75701: sql_exec_internal: SQL: CREATE OR REPLACE FUNCTION hosts_contains (text, text) RETURNS boolean AS '/opt/gvm/lib/libgvm-pg-server', 'sql_hosts_contains' LANGUAGE C IMMUTABLE;
md manage:WARNING:2020-12-18 15h03.05 utc:75701: sqlv: sql_exec_internal failed
md   main:MESSAGE:2020-12-18 15h06.36 utc:75732:    Greenbone Vulnerability Manager version 20.08.0~git-c3857ab7-gvmd-20.08 (GIT revision c3857ab7-gvmd-20.08) (DB revision 233)
md manage:WARNING:2020-12-18 15h06.36 utc:75733: sql_exec_internal: PQexec failed: ERRORE:  libreria incompatibile "/opt/gvm/lib/libgvm-pg-server.so": versione non corrispondente
DETAIL:  La versione del server è 12, quella della libreria è 13.
 (7)
md manage:WARNING:2020-12-18 15h06.36 utc:75733: sql_exec_internal: SQL: CREATE OR REPLACE FUNCTION hosts_contains (text, text) RETURNS boolean AS '/opt/gvm/lib/libgvm-pg-server', 'sql_hosts_contains' LANGUAGE C IMMUTABLE;
md manage:WARNING:2020-12-18 15h06.36 utc:75733: sqlv: sql_exec_internal failed
md   main:MESSAGE:2020-12-18 15h10.06 utc:75796:    Greenbone Vulnerability Manager version 20.08.0~git-c3857ab7-gvmd-20.08 (GIT revision c3857ab7-gvmd-20.08) (DB revision 233)
md manage:WARNING:2020-12-18 15h10.06 utc:75797: sql_exec_internal: PQexec failed: ERRORE:  libreria incompatibile "/opt/gvm/lib/libgvm-pg-server.so": versione non corrispondente
DETAIL:  La versione del server è 12, quella della libreria è 13.
 (7)
md manage:WARNING:2020-12-18 15h10.06 utc:75797: sql_exec_internal: SQL: CREATE OR REPLACE FUNCTION hosts_contains (text, text) RETURNS boolean AS '/opt/gvm/lib/libgvm-pg-server', 'sql_hosts_contains' LANGUAGE C IMMUTABLE;
md manage:WARNING:2020-12-18 15h10.06 utc:75797: sqlv: sql_exec_internal failed
md   main:MESSAGE:2020-12-18 15h13.37 utc:75828:    Greenbone Vulnerability Manager version 20.08.0~git-c3857ab7-gvmd-20.08 (GIT revision c3857ab7-gvmd-20.08) (DB revision 233)
md manage:WARNING:2020-12-18 15h13.37 utc:75829: sql_exec_internal: PQexec failed: ERRORE:  libreria incompatibile "/opt/gvm/lib/libgvm-pg-server.so": versione non corrispondente
DETAIL:  La versione del server è 12, quella della libreria è 13.
 (7)
md manage:WARNING:2020-12-18 15h13.37 utc:75829: sql_exec_internal: SQL: CREATE OR REPLACE FUNCTION hosts_contains (text, text) RETURNS boolean AS '/opt/gvm/lib/libgvm-pg-server', 'sql_hosts_contains' LANGUAGE C IMMUTABLE;
md manage:WARNING:2020-12-18 15h13.37 utc:75829: sqlv: sql_exec_internal failed
md   main:MESSAGE:2020-12-18 15h14.17 utc:75834:    Greenbone Vulnerability Manager version 20.08.0~git-c3857ab7-gvmd-20.08 (GIT revision c3857ab7-gvmd-20.08) (DB revision 233)
md manage:WARNING:2020-12-18 15h14.17 utc:75835: sql_open: PQconnectPoll failed
md manage:WARNING:2020-12-18 15h14.17 utc:75835: sql_open: PQerrorMessage (conn): FATALE:  il ruolo "root" non esiste
md manage:WARNING:2020-12-18 15h14.17 utc:75835: init_manage_process: sql_open failed
md   main:MESSAGE:2020-12-18 15h18.05 utc:75895:    Greenbone Vulnerability Manager version 20.08.0~git-c3857ab7-gvmd-20.08 (GIT revision c3857ab7-gvmd-20.08) (DB revision 233)
md manage:WARNING:2020-12-18 15h18.05 utc:75897: sql_exec_internal: PQexec failed: ERRORE:  libreria incompatibile "/opt/gvm/lib/libgvm-pg-server.so": versione non corrispondente
DETAIL:  La versione del server è 12, quella della libreria è 13.
 (7)
md manage:WARNING:2020-12-18 15h18.05 utc:75897: sql_exec_internal: SQL: CREATE OR REPLACE FUNCTION hosts_contains (text, text) RETURNS boolean AS '/opt/gvm/lib/libgvm-pg-server', 'sql_hosts_contains' LANGUAGE C IMMUTABLE;
md manage:WARNING:2020-12-18 15h18.05 utc:75897: sqlv: sql_exec_internal failed
md   main:MESSAGE:2020-12-18 15h21.36 utc:76146:    Greenbone Vulnerability Manager version 20.08.0~git-c3857ab7-gvmd-20.08 (GIT revision c3857ab7-gvmd-20.08) (DB revision 233)
md manage:WARNING:2020-12-18 15h21.36 utc:76147: sql_exec_internal: PQexec failed: ERRORE:  libreria incompatibile "/opt/gvm/lib/libgvm-pg-server.so": versione non corrispondente
DETAIL:  La versione del server è 12, quella della libreria è 13.
 (7)
md manage:WARNING:2020-12-18 15h21.36 utc:76147: sql_exec_internal: SQL: CREATE OR REPLACE FUNCTION hosts_contains (text, text) RETURNS boolean AS '/opt/gvm/lib/libgvm-pg-server', 'sql_hosts_contains' LANGUAGE C IMMUTABLE;
md manage:WARNING:2020-12-18 15h21.36 utc:76147: sqlv: sql_exec_internal failed
md   main:MESSAGE:2020-12-18 15h25.06 utc:76175:    Greenbone Vulnerability Manager version 20.08.0~git-c3857ab7-gvmd-20.08 (GIT revision c3857ab7-gvmd-20.08) (DB revision 233)
md manage:WARNING:2020-12-18 15h25.06 utc:76176: sql_exec_internal: PQexec failed: ERRORE:  libreria incompatibile "/opt/gvm/lib/libgvm-pg-server.so": versione non corrispondente
DETAIL:  La versione del server è 12, quella della libreria è 13.
 (7)
md manage:WARNING:2020-12-18 15h25.06 utc:76176: sql_exec_internal: SQL: CREATE OR REPLACE FUNCTION hosts_contains (text, text) RETURNS boolean AS '/opt/gvm/lib/libgvm-pg-server', 'sql_hosts_contains' LANGUAGE C IMMUTABLE;
md manage:WARNING:2020-12-18 15h25.06 utc:76176: sqlv: sql_exec_internal failed
root@KaliGVM20:~# journalctl -xe
░░ La fase di avvio è done.
dic 18 16:19:35 KaliGVM20 systemd[1]: gvmd.service: start operation timed out. Terminating.
dic 18 16:19:35 KaliGVM20 systemd[1]: gvmd.service: Failed with result 'timeout'.
░░ Subject: Unit fallita
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ Unità gvmd.service entrata nello stato 'failed' (fallito) con risultato 'timeout'.
dic 18 16:19:35 KaliGVM20 systemd[1]: Failed to start Open Vulnerability Assessment System Manager Daemon.
░░ Subject: L'unità gvmd.service è fallita
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ L'unità gvmd.service è fallita.
░░ 
░░ Il risultato è failed.
dic 18 16:19:50 KaliGVM20 polkitd(authority=local)[527]: Registered Authentication Agent for unix-process:76129:939743 (system bus name :1.186 [/usr/bin/pkttyagent --notify-fd 5 --fallback], object path>
dic 18 16:19:54 KaliGVM20 polkitd(authority=local)[527]: Operator of unix-process:76129:939743 successfully authenticated as unix-user:gabriele to gain ONE-SHOT authorization for action org.freedesktop.>
dic 18 16:21:36 KaliGVM20 systemd[1]: gvmd.service: Scheduled restart job, restart counter is at 6.
░░ Subject: Il riavvio automatico di un'unità è stato schedulato
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ Il riavvio automatico dell'unità gvmd.service è stato schedulato, come risultato
░░ delle impostazioni configurate in Restart=.
dic 18 16:21:36 KaliGVM20 systemd[1]: Stopped Open Vulnerability Assessment System Manager Daemon.
░░ Subject: L'unità gvmd.service ha terminato la fase di spegnimento
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ L'unità gvmd.service ha terminato la fase di spegnimento.
dic 18 16:21:36 KaliGVM20 systemd[1]: Starting Open Vulnerability Assessment System Manager Daemon...
░░ Subject: L'unità gvmd.service inizia la fase di avvio
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ L'unità gvmd.service ha iniziato la fase di avvio.
dic 18 16:21:36 KaliGVM20 systemd[1]: gvmd.service: Can't open PID file /opt/gvm/var/run/gvmd.pid (yet?) after start: Operation not permitted
dic 18 16:23:06 KaliGVM20 systemd[1]: gvmd.service: start operation timed out. Terminating.
dic 18 16:23:06 KaliGVM20 systemd[1]: gvmd.service: Failed with result 'timeout'.
░░ Subject: Unit fallita
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ Unità gvmd.service entrata nello stato 'failed' (fallito) con risultato 'timeout'.
dic 18 16:23:06 KaliGVM20 systemd[1]: Failed to start Open Vulnerability Assessment System Manager Daemon.
░░ Subject: L'unità gvmd.service è fallita
░░ Defined-By: systemd
░░ Support: https://www.debian.org/support
░░ 
░░ L'unità gvmd.service è fallita.
░░ 
░░ Il risultato è failed.
dic 18 16:23:06 KaliGVM20 polkitd(authority=local)[527]: Unregistered Authentication Agent for unix-process:76129:939743 (system bus name :1.186, object path /org/freedesktop/PolicyKit1/AuthenticationA......

the service ospd-scanner and gsad are ok, maybe the problem is during the build of gvmd, infact if i use the command "gvmd --get-users --verbose" i don't see nothing, no error and no users (i've create admin gvmd --create-user=admin --password=admin but i don't understand if the command is ok or not..).
when I have updates I will write to you, thanks you

I just noticed a couple of other spots where I'd hard coded references to /opt/gvm/lib/python3.8/site-packages. I've pushed fixes for that but it might be worth checking /etc/systemd/system/gvm.service, gsa.service, and openvas.service for references to that directory and adjust to match the version of python3 that's installed.

kev.