我正在尝试在我的Mac上安装一些软件; 但是我一直收到同样的错误:
configure: error: The pkg-config script could not be found or is too old. Make sure it
is in your PATH or set the PKG_CONFIG environment variable to the full
path to pkg-config.
Alternatively, you may set the environment variables XMEDCON_GLIB_CFLAGS
and XMEDCON_GLIB_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
To get pkg-config, see <http://pkg-config.freedesktop.org/>.
See `config.log' for more details
Run Code Online (Sandbox Code Playgroud)
我不太确定如何将pkg-config添加到PATH.我在网上看到(见链接)我应该添加以下内容:
export PATH=$PATH:/opt/local/bin # Fixed typo as mentioned in comment
Run Code Online (Sandbox Code Playgroud)
这是我放置pkg-config的地方.每次我尝试使用./configure配置文件时,我仍然会收到错误.任何帮助将非常感激!
小智 67
对于Ubuntu/Debian OS,
apt-get install -y pkg-config
对于Redhat/Yum OS,
yum install -y pkgconfig
Shi*_*bii 28
回答我的问题(经过几次谷歌搜索后)揭示了以下内容:
$ curl https://pkgconfig.freedesktop.org/releases/pkg-config-0.29.tar.gz -o pkgconfig.tgz
$ tar -zxf pkgconfig.tgz && cd pkg-config-0.29
$ ./configure && make install
Run Code Online (Sandbox Code Playgroud)
从以下链接:上面显示的链接
感谢大家的评论,对不起我的linux/OSX无知!
这样做解决了我上面提到的问题.
小智 9
如果你有这个错误:
configure: error: Either a previously installed pkg-config or "glib-2.0 >= 2.16" could not be found. Please set GLIB_CFLAGS and GLIB_LIBS to the correct values or pass --with-internal-glib to configure to use the bundled copy.
Run Code Online (Sandbox Code Playgroud)
而不是这个命令:
$ ./configure && make install
Run Code Online (Sandbox Code Playgroud)
去做 :
./configure --with-internal-glib && make install
Run Code Online (Sandbox Code Playgroud)