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

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.”:

-- 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/
-- Looking for libnet-config...
-- Looking for libnet-config... /usr/bin/libnet-config
-- Looking for pcap...
-- Looking for pcap... /usr/lib64/
-- 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@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/

[root@vrm gvm-libs]# cat /etc/

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

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.


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:


Well, that’s embarrassing :man_facepalming:
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:


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:


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:



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


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:


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