Notus Installed to Wrong Location?

Good afternoon!

I’m running through the compliation instructions for Greenbone Community Edition 22.4. I’ve run my script for testing and then manually ran each individual command listed in https://greenbone.github.io to build it from source on Debian 11 Bullseye. Clean install, updated, and tested on Hyper-V and KVM environments.

Each time I receive an error and exit-code starting the notus-scanner service. I verified the service file is correct, but the executable isn’t found in /usr/local/bin as mentioned in the service file, here:

ExecStart=/usr/local/bin/notus-scanner --products-directory /var/lib/notus/products --log-file /var/log

I stepped back through the commands carefully and noticed that notus-scanner, notus-scan-start, and notus-subscriber are moved to /home/user/.local/bin instead. Is this correct? This command moves them there: sudo cp -rv $INSTALL_DIR/* / and looking through the rest of the instructions, it never appears that notus-scanner gets moved to /usr/local/bin.

Currently, both the bin and lib folders and contents from the notus-scanner build get moved to /home/user/.local and stay there through the entire GCE build process.

I’m otherwise not receiving any other errors/messages during compilation that stick out to me, other than services failing due to notus-scanner failing to start.

Thank you for the help.
DarkTech

The documentation has errors, use pip to install the package you should try to add
“–prefix=$INSTALL_PREFIX” like this:
cd $SOURCE_DIR/notus-scanner-$NOTUS_VERSION

python3 -m pip install . --prefix=$INSTALL_PREFIX --root=$INSTALL_DIR --no-warn-script-location

sudo cp -rv $INSTALL_DIR/* /

2 Likes

Brilliant! Modifying that single python3 command got the built files where they needed to go.

@bricks Not sure if this goes to you for documentation adjustments, but I’m sure you know where it goes.

Thanks @passwd for the solution. Cheers!
DarkTech

About a month ago, I followed the document to deploy successfully, and two days ago I deployed again and found a problem. I checked the notes and found that this part of the document was a little different, so I followed the notes to solve the problem.

1 Like

Hi,

are you advising to add the --prefix argument back? I’ve just removed it in https://github.com/greenbone/docs/pull/229 to fix a nasty issue with newer Python versions and Debian specific patches.

Hey @bricks!

I may advise to recheck if the nasty issue you were encountering still persists using the --prefix argument during the notus-scanner section.

I ran the instructions myself to include it, as @passwd mentioned. Just for the notus-scanner python3 command listed above. I didn’t modify any other command in the installation guide.

Using the current python3 command in the guide, I found that notus-scanner doesn’t get copied to the correct filepath and won’t run. This issue should be reproducible by following the current commands.

Thank you,
DarkTech

1 Like

Thanks for letting me know. It seems pip changed it’s behavior in newer distros a lot and the installation on Debian bullseye is indeed broken now. https://github.com/greenbone/docs/pull/245 will fix that.

2 Likes