centos7 編譯 grpc 時(shí)報(bào)錯(cuò):
Package libcares was not found in the pkg-config search path.
Perhaps you should add the directory containing `libcares.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libcares' found
Package libcares was not found in the pkg-config search path.
Perhaps you should add the directory containing `libcares.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libcares' found
原因
缺少 c-ares
解決方案
- 下載
c-ares
github地址
tar -zxvf c-ares-xxxx.tar.gz
cd c-ares-xxxx
./configure
make &&make install
- 修改環(huán)境變量
- 在
/etc/profile
中增加export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH
source /etc/profile
- 在