宝塔安装 PHP 报错 : libcares.so.2: cannot open shared object file: No such file or directory
2023-10-10 12:46:0 Author: blog.upx8.com(查看原文) 阅读量:9 收藏

系统环境 debian或者ubuntu ,宝塔或者mw

直接说解决办法:安装 apt install libc-ares2 ,然后再去宝塔安装就OK了。

下面是解决问题时的过程

报错信息是这样的:

failed to activate:

/www/server/php/72/sbin/php-fpm: error while loading shared libraries: libcares.so.2: cannot open shared object file: No such file or directory

安装 libc-ares2,执行

apt install libc-ares2

然后再去宝塔安装PHP就可以了。

如果你还是安装不上的话,换成下面这个源再试试:

deb http://mirrors.ustc.edu.cn/debian/ buster main
deb-src http://mirrors.ustc.edu.cn/debian/ buster main

deb http://security.debian.org/debian-security buster/updates main
deb-src http://security.debian.org/debian-security buster/updates main

# buster-updates, previously known as 'volatile'
deb http://mirrors.ustc.edu.cn/debian/ buster-updates main
deb-src http://mirrors.ustc.edu.cn/debian/ buster-updates main

deb http://mirrors.ustc.edu.cn/debian/ buster-backports main non-free contrib
deb-src http://mirrors.ustc.edu.cn/debian/ buster-backports main non-free contrib

deb http://mirrors.aliyun.com/debian/ stretch main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ stretch main non-free contrib
deb http://mirrors.aliyun.com/debian-security stretch/updates main
deb-src http://mirrors.aliyun.com/debian-security stretch/updates main
deb http://mirrors.aliyun.com/debian/ stretch-updates main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ stretch-updates main non-free contrib
deb http://mirrors.aliyun.com/debian/ stretch-backports main non-free contrib
deb-src http://mirrors.aliyun.com/debian/ stretch-backports main non-free contrib


文章来源: https://blog.upx8.com/3854
如有侵权请联系:admin#unsafe.sh