編譯quagga-1.2.2時出現 No package 'libcares' found 問題
./configure --prefix=/usr/src/quagga (預設的安裝路徑是/usr/local/)
編譯過程出現的問題:
configure: error: Package requirements (libcares) were not met:
No package 'libcares' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables CARES_CFLAGS
and CARES_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
解決方法:
下載c-ares-1.12.0.tar.gz
./configure
make&&make install
cp libcares.pc /usr/lib/pkgconfig/
未解決,安裝還是存在問題
原因:不能通過PKG_CONFIG_PATH環境變數值找到c-ares.pc的位置
新增PKG_CONFIG_PATH環境變數
export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH(標註:/usr/local/lib/pkgconfig 是你的pc所在的位置(剛剛預設安裝c-ares位置為/usr/local/),並且該PKG_CONFIG_PATH值是暫時的)
echo $PKG_CONFIG_PATH檢視是否加入