0
点赞
收藏
分享

微信扫一扫

如何安装pkg-config

alanwhy 2022-01-05 阅读 172

Linux上,到pkg-config官网https://www.freedesktop.org/wiki/Software/pkg-config/,下载最新安装包
目前,最新版是2017年3月20日发布的0.29.2,下载地址https://pkg-config.freedesktop.org/releases/pkg-config-0.29.2.tar.gz。
命令wget https://pkg-config.freedesktop.org/releases/pkg-config-0.29.2.tar.gz,下载完成后解压

tar -zxvf pkg-config-0.29.2.tar.gz 

进入安装包

cd pkg-config-0.29.2/

依次执行以下四个命令

sudo ./configure 
sudo make
sudo make check
sudo make install

查看版本

pkg-config --version
0.29.2

注意:提示如下错误:

checking for glib-2.0>=2.16... no

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.

将./configure更改为下面的命令即可。

sudo ./configure --with-internal-glib


 

举报

相关推荐

0 条评论