pkg-config cannot find .pc files although they are in the path

杀马特。学长 韩版系。学妹 提交于 2019-11-30 13:43:53

You can list the directories pkg-config looks in by default using:

pkg-config --variable pc_path pkg-config

PKG_CONFIG_PATH needs the full /usr/local/lib/pkgconfig pathname appended to the variable.

Environment variables need to be export'ed to be useful for commands. Try

$ export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
$ pkg-config --libs --cflags cld
toddysm

It seems that although the PKG_CONFIG_PATH was properly set the Python script was not picking it up. Looking at the script it starts pkg-config in a subprocess and I am not sure whether the environment variable information is passed to the subprocess. Nevertheless I solved the issue by copying the libraries and the .cp file to /opt/local/lib/ which is the default folder where pkg-config looks.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!