./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查看是否加入