greenbone / docs

Documentation for the Greenbone Community Edition
https://greenbone.github.io/docs/
Creative Commons Attribution Share Alike 4.0 International
23 stars 32 forks source link

opsd-openvas install failed #81

Closed LubinLew closed 2 years ago

LubinLew commented 2 years ago

The pip version installed by default on Debian 10 is 18.1, which will cause the installation of ospd-openvas to fail.

root@debian:~/source/ospd-openvas-21.4.4# python3 -m pip install . --prefix=$INSTALL_PREFIX --root=$INSTALL_DIR --no-warn-script-location
Processing /root/source/ospd-openvas-21.4.4
  Installing build dependencies ... done
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/usr/lib/python3.7/tokenize.py", line 447, in open
        buffer = _builtin_open(filename, 'rb')
    FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-req-build-kweufads/setup.py'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-req-build-kweufads/

Should upgrade the pip before install.

python3 -m pip install pip --upgrade
LubinLew commented 2 years ago

Another Issue:

sudo chown -R gvm:gvm /run/ospd
chown: cannot access '/run/ospd': No such file or directory
bjoernricks commented 2 years ago

I've just tested installing ospd-openvas in my local debian:stable-slim docker container and I am sadly not able to reproduce the issue

builduser@3e51fb166a88:~/source/ospd-openvas-21.4.4$ python3 -m pip install . --prefix=$INSTALL_PREFIX --root=$INSTALL_DIR --no-warn-script-location
Processing /home/builduser/source/ospd-openvas-21.4.4
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
    Preparing wheel metadata ... done
Requirement already satisfied: defusedxml<0.8,>=0.6 in /usr/lib/python3/dist-packages (from ospd-openvas==21.4.4) (0.6.0)
Requirement already satisfied: packaging<21.0,>=20.4 in /usr/lib/python3/dist-packages (from ospd-openvas==21.4.4) (20.9)
Requirement already satisfied: redis<4.0.0,>=3.5.3 in /usr/lib/python3/dist-packages (from ospd-openvas==21.4.4) (3.5.3)
Collecting deprecated<2.0.0,>=1.2.10
  Downloading Deprecated-1.2.13-py2.py3-none-any.whl (9.6 kB)
Requirement already satisfied: paramiko<3.0.0,>=2.7.1 in /usr/lib/python3/dist-packages (from ospd-openvas==21.4.4) (2.7.2)
Requirement already satisfied: lxml<5.0.0,>=4.5.2 in /usr/lib/python3/dist-packages (from ospd-openvas==21.4.4) (4.6.3)
Requirement already satisfied: psutil<6.0.0,>=5.5.1 in /usr/lib/python3/dist-packages (from ospd-openvas==21.4.4) (5.8.0)
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.12.1)
Building wheels for collected packages: ospd-openvas
  Building wheel for ospd-openvas (PEP 517) ... done
  Created wheel for ospd-openvas: filename=ospd_openvas-21.4.4-py3-none-any.whl size=107805 sha256=9c52c67720463d457250b5fd66e6f39bd8a8a582537fd34fbc2301ced16e57da
  Stored in directory: /home/builduser/.cache/pip/wheels/29/eb/0a/b074f9488781ca5bc124fd2cd238cb95458019aa606205277c
Successfully built ospd-openvas
Installing collected packages: deprecated, ospd-openvas
Successfully installed deprecated-1.2.13 ospd-openvas-21.4.4

Nevertheless other users reported the same problem at https://community.greenbone.net/t/gvm-release-version-21-4-4/11506/18

bjoernricks commented 2 years ago

Ok from your output /usr/lib/python3.7/tokenize.py I think you are using Debian oldstable. In that case some python dependencies might be too old. Either change the installation according to https://community.greenbone.net/t/gvm-release-version-21-4-4/11506/22 or use Debian stable instead.

LubinLew commented 2 years ago

@bjoernricks

I use the offical image for OpenStack, it released on 20220320, should I use debian 11 ?

https://cloud.debian.org/images/cloud/OpenStack/10.11.5-20220320/debian-10.11.5-20220320-openstack-amd64.qcow2

root@debian:~/source# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 10 (buster)
Release:        10
Codename:       buster
root@debian:~/source#
root@debian:~/source# uname -a
Linux debian 4.19.0-19-cloud-amd64 #1 SMP Debian 4.19.232-1 (2022-03-07) x86_64 GNU/Linux
bjoernricks commented 2 years ago

I don't have a clue about OpenStack. You just need to decide if you want follow https://community.greenbone.net/t/gvm-release-version-21-4-4/11506/22 for Debian oldstable (Buster) or update to Debian stable (Bullseye). Our guide is for Debian stable.

LubinLew commented 2 years ago

OK, I got it. I was misled by the instructions below

This guide assumes that Debian Stable (Buster) is used as the Linux distribution. Most likely, a Debian derivate like Ubuntu and Kali will also work with only minor adjustments required.

bjoernricks commented 2 years ago

That sentence didn't got an update. We just missed it. I updated this sentence a minute ago.

LubinLew commented 2 years ago

@bjoernricks

Thank you for your reply. I think INSTALL.md in the openvas-scanner project should also be updated.

bjoernricks commented 2 years ago

Thanks. I've created a PR for openvas-scanner.