I encountered the same exact issue with compiling ospd-openvas
that @ChristianS had, and running
python3 -m pip install -U pip
did seem to help a bit, but in that same python3 -m pip install . --prefix=$INSTALL_PREFIX --root=$INSTALL_DIR --no-warn-script-location
step got tripped up on a permissions issue, according to the message.
Here’s the message I got:
Collecting pip
Downloading https://files.pythonhosted.org/packages/4d/16/0a14ca596f30316efd412a60bdfac02a7259bf8673d4d917dc60b9a21812/pip-22.0.4-py3-none-any.whl (2.1MB)
100% |████████████████████████████████| 2.1MB 856kB/s
Installing collected packages: pip
Successfully installed pip-22.0.4
Processing /home/user/source/ospd-openvas-21.4.4
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... done
Collecting deprecated<2.0.0,>=1.2.10
Downloading Deprecated-1.2.13-py2.py3-none-any.whl (9.6 kB)
Collecting paramiko<3.0.0,>=2.7.1
Downloading paramiko-2.10.3-py2.py3-none-any.whl (211 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 211.9/211.9 KB 2.3 MB/s eta 0:00:00
Collecting packaging<21.0,>=20.4
Downloading packaging-20.9-py2.py3-none-any.whl (40 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 40.9/40.9 KB 8.5 MB/s eta 0:00:00
Collecting lxml<5.0.0,>=4.5.2
Downloading lxml-4.8.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (6.4 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.4/6.4 MB 8.5 MB/s eta 0:00:00
Requirement already satisfied: psutil<6.0.0,>=5.5.1 in /usr/lib/python3/dist-packages (from ospd-openvas==21.4.4) (5.5.1)
Collecting redis<4.0.0,>=3.5.3
Downloading redis-3.5.3-py2.py3-none-any.whl (72 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 72.1/72.1 KB 15.0 MB/s eta 0:00:00
Collecting defusedxml<0.8,>=0.6
Downloading defusedxml-0.7.1-py2.py3-none-any.whl (25 kB)
Requirement already satisfied: wrapt<2,>=1.10 in /usr/lib/python3/dist-packages (from deprecated<2.0.0,>=1.2.10->ospd-openvas==21.4.4) (1.10.11)
Requirement already satisfied: pyparsing>=2.0.2 in /usr/lib/python3/dist-packages (from packaging<21.0,>=20.4->ospd-openvas==21.4.4) (2.2.0)
Requirement already satisfied: six in /usr/lib/python3/dist-packages (from paramiko<3.0.0,>=2.7.1->ospd-openvas==21.4.4) (1.12.0)
Requirement already satisfied: bcrypt>=3.1.3 in /usr/lib/python3/dist-packages (from paramiko<3.0.0,>=2.7.1->ospd-openvas==21.4.4) (3.1.6)
Requirement already satisfied: pynacl>=1.0.1 in /usr/lib/python3/dist-packages (from paramiko<3.0.0,>=2.7.1->ospd-openvas==21.4.4) (1.3.0)
Requirement already satisfied: cryptography>=2.5 in /usr/lib/python3/dist-packages (from paramiko<3.0.0,>=2.7.1->ospd-openvas==21.4.4) (2.6.1)
Building wheels for collected packages: ospd-openvas
Building wheel for ospd-openvas (pyproject.toml) ... done
Created wheel for ospd-openvas: filename=ospd_openvas-21.4.4-py3-none-any.whl size=107805 sha256=9c52c67720463d457250b5fd66e6f39bd8a8a582537fd34fbc2301ced16e57da
Stored in directory: /home/user/.cache/pip/wheels/a4/7f/c1/de51e892c6e247b6ad91dfcca9de7680b4f30efe9c5617b61f
Successfully built ospd-openvas
Installing collected packages: redis, paramiko, packaging, lxml, deprecated, defusedxml, ospd-openvas
Attempting uninstall: redis
Found existing installation: redis 3.2.1
Uninstalling redis-3.2.1:
ERROR: Could not install packages due to an OSError: [Errno 13] Permission denied: 'utils.py'
Consider using the `--user` option or check the permissions.
cp: cannot stat '/home/user/install/*': No such file or directory
The rest of the install proceeds as expected. When attempting to start the ospd-openvas
service towards the end, it fails and doesn’t start. The other services start and operate fine from what I can tell:
Created symlink /etc/systemd/system/multi-user.target.wants/ospd-openvas.service → /etc/systemd/system/ospd-openvas.service.
Created symlink /etc/systemd/system/multi-user.target.wants/gvmd.service → /etc/systemd/system/gvmd.service.
Created symlink /etc/systemd/system/greenbone-security-assistant.service → /etc/systemd/system/gsad.service.
Created symlink /etc/systemd/system/multi-user.target.wants/gsad.service → /etc/systemd/system/gsad.service.
Job for ospd-openvas.service failed because the control process exited with error code.
See "systemctl status ospd-openvas.service" and "journalctl -xe" for details.
Running sudo journalctl -xe
gives me:
user@GBTEMP:~$ sudo journalctl -xe
--
-- The job identifier is 1232.
Mar 23 10:28:47 GBTEMP systemd[24681]: ospd-openvas.service: Failed to execute command: No such file or directory
Mar 23 10:28:47 GBTEMP systemd[24681]: ospd-openvas.service: Failed at step EXEC spawning /usr/local/bin/ospd-openvas: No such file or directory
-- Subject: Process /usr/local/bin/ospd-openvas could not be executed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- The process /usr/local/bin/ospd-openvas could not be executed and failed.
--
-- The error number returned by this process is ERRNO.
Mar 23 10:28:47 GBTEMP systemd[1]: ospd-openvas.service: Control process exited, code=exited, status=203/EXEC
-- Subject: Unit process exited
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- An ExecStart= process belonging to unit ospd-openvas.service has exited.
--
-- The process' exit code is 'exited' and its exit status is 203.
Mar 23 10:28:47 GBTEMP systemd[1]: ospd-openvas.service: Failed with result 'exit-code'.
-- Subject: Unit failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- The unit ospd-openvas.service has entered the 'failed' state with result 'exit-code'.
Mar 23 10:28:47 GBTEMP systemd[1]: Failed to start OSPd Wrapper for the OpenVAS Scanner (ospd-openvas).
-- Subject: A start job for unit ospd-openvas.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- A start job for unit ospd-openvas.service has finished with a failure.
--
-- The job identifier is 1232 and the job result is failed.
Mar 23 10:29:18 GBTEMP sudo[24719]: user : TTY=pts/0 ; PWD=/home/user ; USER=root ; COMMAND=/usr/bin/journalctl -xe
Mar 23 10:29:18 GBTEMP sudo[24719]: pam_unix(sudo:session): session opened for user root by user(uid=0)
Running sudo systemctl status ospd-openvas
gives me:
ospd-openvas.service - OSPd Wrapper for the OpenVAS Scanner (ospd-openvas)
Loaded: loaded (/etc/systemd/system/ospd-openvas.service; enabled; vendor preset: enabled)
Active: activating (auto-restart) (Result: exit-code) since Wed 2022-03-23 10:29:47 EDT; 46s ago
Docs: man:ospd-openvas(8)
man:openvas(8)
Process: 24741 ExecStart=/usr/local/bin/ospd-openvas --unix-socket /run/ospd/ospd-openvas.sock --pid-file /run/ospd/ospd-openvas.pid --log-file /var/log/gvm/ospd-openvas.log --lock-file-dir /var/lib/openvas --socket-mode 0o770 (code=exited, status=203/EXEC)
This is performed on a clean, fresh installation of Debian 10 Buster in a VM. APT states all packages are up-to-date prior to the installation process. Normally I run it from an install script I set up based on the instructions for building GBSE, but running each command one at a time has the same result.
If this is posted in the wrong location or needs its own thread, let me know.
Any assistance is much appreciated. Thank you for your time.