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(或其他庫)的值。它是語言不可知的,因此它可以用來定義文檔工具的位置。