centos7 编译 grpc 时报错:
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
- 修改环境变量
- 在
/etc/profile
中增加export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH
source /etc/profile
- 在