系统环境 腾讯云 debian 10 64位,宝塔?免费版 7.8.0
直接说解决办法:安装?apt install libc-ares2 ,然后再去宝塔安装就OK了。
下面是解决问题时的过程
报错信息是这样的:
/www/server/php/70/sbin/php-fpm:?error?while?loading?shared?libraries:?libcares.so.2:?cannot?open?shared?object?file:?No?such?file?or?directory
?当然,如果PHP版本不同也有可能是下面这些:
/www/server/php/52/sbin/php-fpm: error while loading shared libraries: libcares.so.2: cannot open shared object file: No such file or directory
/www/server/php/53/sbin/php-fpm: error while loading shared libraries: libcares.so.2: cannot open shared object file: No such file or directory
/www/server/php/54/sbin/php-fpm: error while loading shared libraries: libcares.so.2: cannot open shared object file: No such file or directory
/www/server/php/55/sbin/php-fpm: error while loading shared libraries: libcares.so.2: cannot open shared object file: No such file or directory
/www/server/php/56/sbin/php-fpm: error while loading shared libraries: libcares.so.2: cannot open shared object file: No such file or directory
/www/server/php/70/sbin/php-fpm: error while loading shared libraries: libcares.so.2: cannot open shared object file: No such file or directory
/www/server/php/71/sbin/php-fpm: error while loading shared libraries: libcares.so.2: cannot open shared object file: No such file or directory
/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
/www/server/php/73/sbin/php-fpm: error while loading shared libraries: libcares.so.2: cannot open shared object file: No such file or directory
/www/server/php/74/sbin/php-fpm: error while loading shared libraries: libcares.so.2: cannot open shared object file: No such file or directory
/www/server/php/80/sbin/php-fpm: error while loading shared libraries: libcares.so.2: cannot open shared object file: No such file or directory
/www/server/php/81/sbin/php-fpm: error while loading shared libraries: libcares.so.2: cannot open shared object file: No such file or directory
?其实主要就是要把这个?libcares.so.2 想办法安装上,我用的腾讯云 debian10。直接执行:
apt install libcares2
?肯定是找不到的:
Reading package lists... Done Building dependency tree ? ? ?? Reading state information... Done E: Unable to locate package curl-loader
百度了很久,终于知道要安装?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
非常感谢你能看到这里,其实我也是菜鸟,如果这个问题你还没有解决的话,请留言。我们一起来研究研究。
|