1 year ago
#177535
Arnab Ghosh
Adding pkg-config search path in CentOS
I have this library(lxc) installed which has the .pc file in
/usr/local/lib/pkgconfig
I'm working on a modified version of CentOS. Apparantly, I'm having pkg-conf package (instead of pkg-config). When I try to install a package which has dependencies on this library, on running cmake ..
, I get the error Package 'lxc' required by 'virtual:world', not found /usr/share/cmake/Modules/FindPkgConfig.cmake:467(message): A required package was not found
. Now when I do
pkg-config --variable pc_path pkg-config
it shows /usr/lin64/pkgconfig:/usr/share/pkgconfig
. So I need to add the /usr/local/lib/pkgconfig
to the search path. However, this does not seem straightforward. The general recommended solution is to add this path using export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
. However, this does not work. I also tried adding a file local.conf
in the folder /etc/ld.so.conf.d
with the content as /usr/local/lib/pkgconfig
but this doesn't help either. Searching the man page of pkg_conf here https://man.archlinux.org/man/pkgconf.1.en , I also tried doing export $CMAKE_PREFIX_PATH=/usr/local/lib/pkgconfig
, which also doesn't help. I'm a bit out of ideas at this point and would be really grateful if someone could provide an insight.
centos
pkg-config
0 Answers
Your Answer