root@f90f57717d70:~/sources/gsa-21.4.4# dpkg -l yarnpkg
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name Version Architecture Description
+++-==============-=====================-============-=========================================
ii yarnpkg 1.22.10+~cs22.25.14-3 all Fast, reliable and secure npm alternative
It seems there is an already installed version of the python redis library. Can you try to run apt remove python3-redis and afterwards python3 -m pip install . --prefix=$INSTALL_PREFIX --root=$INSTALL_DIR --no-warn-script-location again?
Just tested in a clean Debian container and followed the steps manually. There it works. So I guess I do something wrong in my Dockerfile. I’ll figure it out.
I found the problem, I followed this installation guide. Which instructs the user to install nodejs from a 3rd party repo. However, this installation guide does not give this instruction. When not upgrading nodejs, everything works.
Could someone please advice which documentation is leading and mostly maintained? I always follow the README docs in the GitHub projects. This causes issues more often, so maybe I’m just reading the wrong docs?
Did this. It resolved the error, but only for that package. It also errored out for python3-packaging, python3-lxml, python3-defusedxml, python3-paramiko, python3-redis in total.
During the ospd-openvas compile and install section, it explicitly states to install these packages prior to pulling the GitHub code and compiling. If these packages don’t need to be installed prior to complation, I’m not sure why it requests this explicitly here:
After those adjustments were made, ospd-openvas installs correctly and runs as expected after the Greenbone installation is all said and done. Perhaps the instructions I’ve found are outdated or not the correct set to follow. If so, I’d love to have an authoritative location for updated GSE install commands, as @AquaL1te mentioned.
If I am right you are using Debian oldstable (Buster). In that case some python packages installed via the distribution (apt install) might be indeed to old for ospd-openvas.
I was indeed using Debian 10 Buster. I noticed the instructions have changed accordingly. I spun up a Debian 11 Bullseye VM from a Debian Bullseye netinst ISO and attempted running the updated instructions provided in the Greenbone Docs.
The postgresql-server-dev-11 package isn’t available in the Debian Bullseye repos. It results in the following message during the gvmd section:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package postgresql-server-dev-11
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
It causes this further down the line when compiling:
user@Greenbone:~/build/gvmd$ cmake $SOURCE_DIR/gvmd-$GVMD_VERSION \
> -DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX \
> -DCMAKE_BUILD_TYPE=Release \
> -DLOCALSTATEDIR=/var \
> -DSYSCONFDIR=/etc \
> -DGVM_DATA_DIR=/var \
> -DGVM_RUN_DIR=/run/gvm \
> -DOPENVAS_DEFAULT_SOCKET=/run/ospd/ospd-openvas.sock \
> -DGVM_FEED_LOCK_PATH=/var/lib/gvm/feed-update.lock \
> -DSYSTEMD_SERVICE_DIR=/lib/systemd/system \
> -DDEFAULT_CONFIG_DIR=/etc/default \
> -DLOGROTATE_DIR=/etc/logrotate.d
-- Configuring Greenbone Vulnerability Manager...
-- The C compiler identification is GNU 10.2.1
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.2")
-- Could NOT find Git (missing: GIT_EXECUTABLE)
-- Install prefix: /usr/local
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Checking for module 'libgvm_base>=21.4.1'
-- Found libgvm_base, version 21.4.4
-- Checking for module 'libgvm_util>=21.4.1'
-- Found libgvm_util, version 21.4.4
-- Checking for module 'libgvm_osp>=21.4.1'
-- Found libgvm_osp, version 21.4.4
-- Checking for module 'libgvm_gmp>=21.4.1'
-- Found libgvm_gmp, version 21.4.4
-- Checking for module 'gnutls>=3.2.15'
-- Found gnutls, version 3.7.1
-- Checking for module 'glib-2.0>=2.42'
-- Found glib-2.0, version 2.66.8
-- Checking for module 'libical>=1.00'
-- Found libical, version 3.0.9
-- Looking for PostgreSQL...
CMake Error at cmake/FindPackageHandleStandardArgs.cmake:165 (message):
Could NOT find PostgreSQL (missing: PostgreSQL_TYPE_INCLUDE_DIR) (found
version "13.5")
Call Stack (most recent call first):
cmake/FindPackageHandleStandardArgs.cmake:458 (_FPHSA_FAILURE_MESSAGE)
cmake/FindPostgreSQL.cmake:247 (find_package_handle_standard_args)
src/CMakeLists.txt:43 (find_package)
-- Configuring incomplete, errors occurred!
See also "/home/user/build/gvmd/CMakeFiles/CMakeOutput.log".
See also "/home/user/build/gvmd/CMakeFiles/CMakeError.log".
user@Greenbone:~/build/gvmd$
Another package changed names from python-impacket to python3-impacket:
Package python-impacket is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
python3-impacket
E: Package 'python-impacket' has no installation candidate
As the instructions are currently written, gvmd fails to compile on Debian 11 Bullseye (Stable) for me.
Thanks again for your efforts. Just trying to get this all sorted out.
Update: I changed the packages installed from postgresql-server-dev-11 to postgresql-server-dev-13and from python-impacket to python3-impacket and everything seems to compile and operate correctly on Debian 11 Bullseye.
I had to modify the command from sudo systemctl start postgresql@11-main to sudo systemctl start postgresql@13-main accordingly for starting the database in a later step. I also noted that disabling the JIT feature on PostgreSQL 13 is needed as well due to performance issues.
No further issues so far. Thank you @bricks for your support!
AFACIT those are the correct / recent docs which only contains the info to only install ospd-openvas and not ospd in addition which seems you are trying to do based on the previous posted output.