升级php的时候报错:cannot find -lcares原因:缺少c-cares组件导致的
可能原先安装的时候是急速安装,急速安装无需编译,更新的时候使用的是编译安装,需要服务器上有各种依赖
解决方案:
Debian|Ubuntu
- apt-get update
- apt-get install libc-ares-dev
RedHat|CentOS
- yum install c-ares c-ares-devel
如果提示没有安装包,请执行下面命令解决
7版本:
下载依赖rpm包
- wget http://mirror.centos.org/centos/7/os/x86_64/Packages/c-ares-devel-1.10.0-3.el7.x86_64.rpm
- wget http://mirror.centos.org/centos/7/os/x86_64/Packages/c-ares-1.10.0-3.el7.x86_64.rpm
安装:
8版本:
下载依赖rpm包
- wget https://vault.centos.org/centos/8/BaseOS/x86_64/os/Packages/c-ares-devel-1.13.0-5.el8.x86_64.rpm
- wget https://vault.centos.org/centos/8/BaseOS/x86_64/os/Packages/c-ares-1.13.0-5.el8.x86_64.rpm
安装