Gvm-libs dependencies error

Hello Team,

I am following the guide on the official documentation to build GVM software on Ubuntu 22.04. I however get an error while building and installing gvm-libs while installing the dependencies.

sudo apt install -y \
  libglib2.0-dev \
  libgpgme-dev \
  libgnutls28-dev \
  uuid-dev \
  libssh-gcrypt-dev \
  libhiredis-dev \
  libxml2-dev \
  libpcap-dev \
  libnet1-dev \
  libpaho-mqtt-dev

i get an error

E: Unable to locate package libpaho-mqtt-dev

I have tried to search on how to resolve this error, but am not getting a clear source. How do i resolve this error?

root@250e272ebda6:/# apt update
Get:1 http://archive.ubuntu.com/ubuntu jammy InRelease [270 kB]
Get:2 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]
Get:3 http://security.ubuntu.com/ubuntu jammy-security/multiverse amd64 Packages [44.0 kB]
Get:4 http://archive.ubuntu.com/ubuntu jammy-updates InRelease [119 kB]
Get:5 http://archive.ubuntu.com/ubuntu jammy-backports InRelease [109 kB]       
Get:6 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages [1194 kB]
Get:7 http://archive.ubuntu.com/ubuntu jammy/restricted amd64 Packages [164 kB]
Get:8 http://archive.ubuntu.com/ubuntu jammy/universe amd64 Packages [17.5 MB]
Get:9 http://security.ubuntu.com/ubuntu jammy-security/restricted amd64 Packages [1392 kB]
Get:10 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 Packages [1008 kB] 
Get:11 http://archive.ubuntu.com/ubuntu jammy/multiverse amd64 Packages [266 kB]            
Get:12 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages [1792 kB]
Get:13 http://archive.ubuntu.com/ubuntu jammy-updates/universe amd64 Packages [1274 kB]
Get:14 http://archive.ubuntu.com/ubuntu jammy-updates/restricted amd64 Packages [1420 kB]
Get:15 http://archive.ubuntu.com/ubuntu jammy-updates/multiverse amd64 Packages [49.8 kB]                                                                                                                                                  
Get:16 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages [1466 kB]                                                                                                                                                        
Get:17 http://archive.ubuntu.com/ubuntu jammy-backports/universe amd64 Packages [32.6 kB]                                                                                                                                                  
Get:18 http://archive.ubuntu.com/ubuntu jammy-backports/main amd64 Packages [78.3 kB]                                                                                                                                                      
Fetched 28.3 MB in 7s (4229 kB/s)                                                                                                                                                                                                          
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
7 packages can be upgraded. Run 'apt list --upgradable' to see them.
root@250e272ebda6:/# apt install libpaho-mqtt-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  libpaho-mqtt1.3
The following NEW packages will be installed:
  libpaho-mqtt-dev libpaho-mqtt1.3
0 upgraded, 2 newly installed, 0 to remove and 7 not upgraded.
Need to get 356 kB of archives.
After this operation, 2405 kB of additional disk space will be used.

Should not be an issue on Ubuntu 22.04. The package is available.

Maybe you forgot a sudo apt update before? Or you are using Ubuntu 20.04 instead of 22.04? You can check that with cat /etc/os-release. The output should be similar to

PRETTY_NAME="Ubuntu 22.04.3 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.3 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
2 Likes

Thank you bricks.
I was running the commands on Ubuntu 20.04, and the issue persisted.
On Ubuntu 22.04, everything is running smoothly.
Big thank you.

I run into another problem while building and installing pg-gvm on Ubuntu 22.04.

$ cat /etc/os-release 
PRETTY_NAME="Ubuntu 22.04.3 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.3 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy

The error occurs at the step where i have to extract the pg-gvm tarball.

tar -C $SOURCE_DIR -xvzf $SOURCE_DIR/pg-gvm-$PG_GVM_VERSION.tar.gz

I get the error below:

tar: You must specify one of the '-Acdtrux', '--delete' or '--test-label' options
Try 'tar --help' or 'tar --usage' for more information.

What could cause this? and how do i solve thi?

Please check if $SOURCE_DIR and $PG_GVM_VERSION are set.

2 Likes

Yes, i did exactly that with the commands below.

  1. Setting the pg-gvm version to use
export PG_GVM_VERSION=22.6.1
  1. Then installed the deps.
sudo apt install -y \
  libglib2.0-dev \
  postgresql-server-dev-14 \
  libical-dev
  1. Downloaded PG-GVM sources:
curl -f -L https://github.com/greenbone/pg-gvm/archive/refs/tags/v$PG_GVM_VERSION.tar.gz -o $SOURCE_DIR/pg-gvm-$PG_GVM_VERSION.tar.gz
curl -f -L https://github.com/greenbone/pg-gvm/releases/download/v$PG_GVM_VERSION/pg-gvm-$PG_GVM_VERSION.tar.gz.asc -o $SOURCE_DIR/pg-gvm-$PG_GVM_VERSION.tar.gz.asc
  1. Verified the source file:
gpg --verify $SOURCE_DIR/pg-gvm-$PG_GVM_VERSION.tar.gz.asc $SOURCE_DIR/pg-gvm-$PG_GVM_VERSION.tar.gz

The output showed my source is okay:

gpg: Signature made 26 Julai 2023 12:18:16 alasiri EAT
gpg:                using RSA key 8AE4BE429B60A59B311C2E739823FAA60ED1E580
gpg: Good signature from "Greenbone Community Feed integrity key" [ultimate]

  1. But on extracting the tarball:
$ tar -C $SOURCE_DIR -xvzf $SOURCE_DIR/pg-gvm-$PG_GVM_VERSION.tar.gz
tar: You must specify one of the '-Acdtrux', '--delete' or '--test-label' options
Try 'tar --help' or 'tar --usage' for more information.

What am i skipping out ?

I am really sure you didn’t set SOURCE_DIR. Please verify that echo $SOURCE_DIR shows the correct directory.

2 Likes