【问题标题】:pkg-config doesn't see .pc file, even when containing folder is in PKG_CONFIG_PATHpkg-config 看不到 .pc 文件,即使包含文件夹位于 PKG_CONFIG_PATH
【发布时间】:2013-04-22 19:45:49
【问题描述】:

我正在运行 gentoo linux,我正在尝试让 pkg-config 找到 ntk.pc(ntk 是我要链接到的库)。场地如下:

echo $PKG_CONFIG_PATH的输出:

/usr/local/lib/pkgconfig:/usr/lib/pkgconfig

locate ntk.pc 的输出:

/usr/local/lib/pkgconfig/ntk.pc

pkg-config --modversion ntk的输出:

Package ntk was not found in the pkg-config search path.
Perhaps you should add the directory containing `ntk.pc'
to the PKG_CONFIG_PATH environment variable
No package 'ntk' found

cat /usr/local/lib/pkgconfig/ntk.pc的输出:

prefix=/usr/local
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: ntk
Description: Non ToolKit
Version: 1.3.0

Requires: cairo >= 1.9.0
Requires.private: x11 xft
Libs: -L${libdir} -lntk
Cflags: -I${includedir}/ntk -pthread -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE

任何帮助都会很棒。如果您需要更多信息,请发表评论,我会给您。提前谢谢你!

【问题讨论】:

  • 你应该在superuser.com上问这个问题,你会更有可能得到答案。

标签: gentoo pkg-config


【解决方案1】:

所以我修好了。事实证明,pkg-config 不像普通的 bash 路径(/usr:/bin...等)那样理解冒号分隔,或者我的 comp 只需要重新启动。无论哪种方式,将 $PKG_CONFIG_PATH 分配给 /usr/local/lib/pkgconfig 都有效!

【讨论】:

    猜你喜欢
    • 2012-08-23
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-07-03
    • 1970-01-01
    • 2013-04-09
    • 1970-01-01
    • 2018-03-09
    相关资源
    最近更新 更多