在pkg-config搜索路径中找不到软件包检查 [英] Package check was not found in the pkg-config search path
问题描述
我在netbeans中使用check包进行C编程,但是我从netbeans收到此错误: 在pkg-config搜索路径中找不到软件包检查. 也许您应该添加包含"check.pc"的目录 到PKG_CONFIG_PATH环境变量 找不到包检查"
I am using check package in netbeans for C programming, But I receive this error from netbeans: Package check was not found in the pkg-config search path. Perhaps you should add the directory containing `check.pc' to the PKG_CONFIG_PATH environment variable No package 'check' found
在终端中,如果我插入以下行:
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
接着
pkg-config --modversion check
它可以找到检查包,但是在netbeans中,我仍然遇到相同的错误.
我该怎么办?
In the terminal if I insert this line:
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
and then
pkg-config --modversion check
it can find the check package, but in netbeans I still get the same error.
What should I do?
预先感谢
推荐答案
如果使用OS X Mavericks,
然后通过 HomeBrew 下载软件包"check","valgrind","gcc"和"pkg-config".
然后编辑/etc/launchd.conf
并在其中添加setenv PATH <your $PATH>
用您的真实路径替换.在此文件中,不能使用$ HOME等.此路径应包括gcc,check和valgrind.为此,您需要重新启动计算机.
If you use OS X Mavericks,
Then download packages "check", "valgrind", "gcc" and "pkg-config" through the HomeBrew.
then edit /etc/launchd.conf
and add there setenv PATH <your $PATH>
Substitute with your real path. In this file no $HOME or such can't be used. This path should include gcc, check and valgrind. For this to take effect you need to restart your computer.
这对我来说很有效:
$ cat /etc/launchd.conf
setenv PATH /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
这篇关于在pkg-config搜索路径中找不到软件包检查的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!