In the service file there is “ExecStart=/usr/local/bin/ospd-openvas”, but upon inspection of /usr/local/bin there is no ospd-openvas file. From the python package installation I also can’t make out where that file should come from, so I wonder if I missed part of the manual, or some step.
I hope somebody can help with this, I’m really interested in getting started with openvas!
you need to ensure that the environment variables SOURCE_DIR, OSPD_OPENVAS_VERSION, INSTALL_PREFIX and INSTALL_DIR are really set. After running python3 -m pip ... you can also take a look at $INSTALL_DIR/usr/local/bin if there is a ospd-openvas script.
OK, I have found the reason this did not work for me. Possibly this is because of specific settings for pip on my distribution?
What happened is that the pip output wrote to $INSTALL_DIR/usr/local/local/bin and ../lib. What fixed it for me is to the string “/usr” instead of $INSTALL_PREFIX, so that the files ended up at the correct location.
I hope this helps anyone having the same trouble as I did.
What I’m referring to is just a step in the official installation guide, where the ospd-openvas python package is installed to a ‘local’ path (with --root=$INSTALL_DIR and --prefix=$INSTALL_PREFIX as arguments to pip), after which the installed packages and scripts are moved to /usr/local/bin and /usr/local/lib (see code block in an earlier post for the code running pip and https://greenbone.github.io/docs/latest/22.4/source-build/index.html#ospd-openvas for the relevant installation instructions).
I just noticed that the “prepared” package location was in /home/user/install/usr/local/local/bin instead of /home/user/install/usr/local/bin. (note: local/local in the first path). Therefore I tweaked the pip command to instead of using ‘/usr/local’ as $INSTALL_DIR, now to use ‘/usr’ in that variable, which ended up putting the files in the correct location. I now have a running instance of openvas!
If you think the installation instructions are wrong, then maybe it’s good to contact the authors, I’m just a beginner in this respect.
This looks like an issue with Ubuntu. pip uses introspection methods provided by the Python interpreter to discover paths, and Linux distributions are known to mangle those paths. Please report to the distributions instead.