Package check was not found in the pkg-config sear

2019-08-03 14:34发布

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

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?

Thanks in advance

1条回答
\"骚年 ilove
2楼-- · 2019-08-03 15:21

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.

For me this worked:

$ cat /etc/launchd.conf
setenv PATH /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
查看更多
登录 后发表回答