Package 'libgcrypt', required by 'virtual:world', not found

Hello,
Trying to compile on fully up to date CentOS 8, and following this Building 22.4 from Source - Greenbone Community Documentation, i get the following error on the topic “Afterwards, gvm-libs can be build and installed.”:

[root@vrm gvm-libs]# cmake $SOURCE_DIR/gvm-libs-$GVM_LIBS_VERSION   -DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX   -DCMAKE_BUILD_TYPE=Release   -DSYSCONFDIR=/etc   -DLOCALSTATEDIR=/var   -DCMAKE_C_FLAGS="-O2"   -DCMAKE_C_FLAGS_RELEASE="-O2"
-- Configuring the Greenbone Vulnerability Management Libraries...
-- Looking for clang-format...
-- clang-format not found...
-- Using redis socket /run/redis/redis.sock
-- Install prefix: /usr/local
-- Looking for libnet...
-- Looking for net... /usr/lib64/libnet.so
-- Looking for libnet-config...
-- Looking for libnet-config... /usr/bin/libnet-config
-- Looking for pcap...
-- Looking for pcap... /usr/lib64/libpcap.so
-- Looking for pcap-config...
-- Looking for pcap-config... /usr/bin/pcap-config
-- Checking for module 'libgcrypt'
--   Package 'libgcrypt', required by 'virtual:world', not found
CMake Error at /usr/share/cmake/Modules/FindPkgConfig.cmake:556 (message):
  A required package was not found
Call Stack (most recent call first):
  /usr/share/cmake/Modules/FindPkgConfig.cmake:778 (_pkg_check_modules_internal)
  util/CMakeLists.txt:43 (pkg_check_modules)


-- Configuring incomplete, errors occurred!
See also "/root/build/gvm-libs/CMakeFiles/CMakeOutput.log".
See also "/root/build/gvm-libs/CMakeFiles/CMakeError.log".
[root@vrm gvm-libs]#

libgcrypt-devel was installed in a previous step, without issues, and all envirnment variables are set…

Any ideas?

Thank you

Note: Edited to add more context below.

[root@vrm gvm-libs]# pwd
/root/build/gvm-libs

[root@vrm gvm-libs]# dnf list libgcrypt*                     
Last metadata expiration check: 1:02:33 ago on Fri 17 Nov 2023 03:15:34 PM WET.
Installed Packages
libgcrypt.x86_64                                                  1.8.5-7.el8                                             @baseos
libgcrypt-devel.x86_64                                            1.8.5-7.el8                                             @baseos
Available Packages
libgcrypt.i686                                                    1.8.5-7.el8                                             baseos 
libgcrypt-devel.i686                                              1.8.5-7.el8                                             baseos 

[root@vrm gvm-libs]# cat /etc/redhat-release 
CentOS Stream release 8

[root@vrm gvm-libs]# set | grep root/
BUILD_DIR=/root/build
HISTFILE=/root/.bash_history
INSTALL_DIR=/root/install
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/usr/local/sbin
PWD=/root/build/gvm-libs
SOURCE_DIR=/root/source
colors=/root/.dircolors

[root@vrm gvm-libs]# cat /etc/ld.so.conf.d/local.conf
/usr/local/lib
/usr/local/lib64

[root@vrm gvm-libs]# ldconfig -p | grep gcrypt
        libgcrypt.so.20 (libc6,x86-64) => /lib64/libgcrypt.so.20
        libgcrypt.so (libc6,x86-64) => /lib64/libgcrypt.so

Hi, as far as I know it’s not possible to build our software stack on CentOS 8 without issues. We support CentOS 9 only.

4 Likes

Hi Bricks. Thank you for your awnser.
Just one note, I would suggest you add a call out note on your “Building 22.4 from Source” with the supported OS versions to build on.
Best regards

:smiley: Its already there. :smiley:

4 Likes

Well, that’s embarrassing :man_facepalming:
:slight_smile:
Thank you!

1 Like

No sweat! Greenbone documentation are actually really great, but often overlooked!

1 Like

Install libgcrypt Development Files: Ensure that the development files for libgcrypt are installed on your system. You can install them using the following command:

bash

sudo dnf install libgcrypt-devel

This command will install the development files necessary for compiling programs that use libgcrypt.

Check pkg-config: Many software packages use pkg-config to locate libraries and their associated development files. Ensure that pkg-config is installed on your system:

bash

sudo dnf install pkgconf-pkg-config

Check pkg-config Path: After installing pkg-config, ensure that its path includes the directory where libgcrypt.pc file is located. You can verify this by checking the PKG_CONFIG_PATH environment variable:

bash

echo $PKG_CONFIG_PATH

If the directory containing libgcrypt.pc is not listed, you can add it to the PKG_CONFIG_PATH variable:

bash

export PKG_CONFIG_PATH=/path/to/libgcrypt/pkgconfig:$PKG_CONFIG_PATH

Replace /path/to/libgcrypt/pkgconfig with the actual path to the directory containing libgcrypt.pc.

Check for libgcrypt.pc: Ensure that the libgcrypt.pc file is present in a directory listed in the PKG_CONFIG_PATH. You can search for it using the find command:

bash

sudo find / -name "libgcrypt.pc" 2>/dev/null

This command will search for libgcrypt.pc in the entire filesystem. If it’s not found, it indicates that the libgcrypt development files might not be installed correctly.

Verify Installation: After ensuring that the development files are installed and pkg-config is properly configured, try to configure or compile your program again. It should now recognize libgcrypt.

1 Like