linux 安装报错:pkg-config not found

linux 安装报错:pkg-config not found


 

使用编译安装时,在执行./configure时报如下错误:

...
...
checking for pkg-config... no
pkg-config not found
configure: error: Please reinstall the pkg-config distribution

提示,配置错误,请重新安装pkg配置分发。

解决方法,根据提示,安装pkg-config:

sudo apt-get install pkg-config

扩展知识:

关于pkg-config的简介:

pkg-config is a helper tool used when compiling applications and libraries. It helps you insert the correct compiler options on the command line so an application can use gcc -o test test.c `pkg-config --libs --cflags glib-2.0` for instance, rather than hard-coding values on where to find glib (or other libraries). It is language-agnostic, so it can be used for defining the location of documentation tools, for instance.

翻译:

PKG CONFIG是编译应用程序和库时使用的辅助工具。它帮助您在命令行中插入正确的编译器选项,以便应用程序可以使用gcc-o test test.c'pkg-config--libs--cflags glib-2.0',例如,而不是硬编码在哪里找到glib(或其他库)的值。它是语言不可知的,因此它可以用来定义文档工具的位置。


 

posted @ 2018-09-12 15:37  学知无涯  阅读(20490)  评论(0编辑  收藏  举报