error while loading shared libraries: libcares.so.2 解决问题

87 篇文章 4 订阅

今天宝塔下安装php 报错

/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

自己摸索解决

 

[root@10-9-144-239 ~]# find / -name libcares.so.2
[root@10-9-144-239 ~]# yum search cares
Loaded plugins: fastestmirror, langpacks, versionlock
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
Excluding 1 update due to versionlock (use "yum versionlock status" to show it)
Warning: No matches found for: cares
No matches found
[root@10-9-144-239 ~]# yum search c-ares
Loaded plugins: fastestmirror, langpacks, versionlock
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
Excluding 1 update due to versionlock (use "yum versionlock status" to show it)
=================================================================== N/S matched: c-ares ===================================================================
c-ares-devel.i686 : Development files for c-ares
c-ares-devel.x86_64 : Development files for c-ares
c-ares.i686 : A library that performs asynchronous DNS operations
c-ares.x86_64 : A library that performs asynchronous DNS operations

  Name and summary matches only, use "search all" for everything.
[root@10-9-144-239 ~]# yum install c-ares-devel.x86_64 
Loaded plugins: fastestmirror, langpacks, versionlock
Loading mirror speeds from cached hostfile
 * base: mirrors.aliyun.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.aliyun.com
Excluding 1 update due to versionlock (use "yum versionlock status" to show it)
Resolving Dependencies
--> Running transaction check
---> Package c-ares-devel.x86_64 0:1.10.0-3.el7 will be installed
--> Processing Dependency: c-ares = 1.10.0-3.el7 for package: c-ares-devel-1.10.0-3.el7.x86_64
--> Processing Dependency: libcares.so.2()(64bit) for package: c-ares-devel-1.10.0-3.el7.x86_64
--> Running transaction check
---> Package c-ares.x86_64 0:1.10.0-3.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

===========================================================================================================================================================
 Package                                 Arch                              Version                                   Repository                       Size
===========================================================================================================================================================
Installing:
 c-ares-devel                            x86_64                            1.10.0-3.el7                              base                             72 k
Installing for dependencies:
 c-ares                                  x86_64                            1.10.0-3.el7                              base                             78 k

Transaction Summary
===========================================================================================================================================================
Install  1 Package (+1 Dependent package)

Total download size: 150 k
Installed size: 262 k
Is this ok [y/d/N]: y
Downloading packages:
(1/2): c-ares-1.10.0-3.el7.x86_64.rpm                                                                                               |  78 kB  00:00:00     
(2/2): c-ares-devel-1.10.0-3.el7.x86_64.rpm                                                                                         |  72 kB  00:00:00     
-----------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                      729 kB/s | 150 kB  00:00:00     
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Warning: RPMDB altered outside of yum.
** Found 11 pre-existing rpmdb problem(s), 'yum check' output follows:
bt-curl-7.54.0-1.el7.centos.x86_64 has missing requires of libcares.so.2()(64bit)
bt-curl-7.70.0-1.el7.x86_64 is a duplicate with bt-curl-7.54.0-1.el7.centos.x86_64
bt-libiconv-1.14-1.el7.centos.x86_64 has missing requires of libcharset.so.1()(64bit)
bt-libiconv-1.14-1.el7.centos.x86_64 has missing requires of libiconv.so.2()(64bit)
bt-php-5.6.30-1.el7.centos.x86_64 has missing requires of libcares.so.2()(64bit)
bt-php-5.6.30-1.el7.centos.x86_64 has missing requires of libiconv
bt-php-5.6.30-1.el7.centos.x86_64 has missing requires of libmcrypt
bt-php-5.6.30-1.el7.centos.x86_64 has missing requires of mcrypt
bt-php-5.6.30-1.el7.centos.x86_64 has missing requires of mhash
2:postfix-2.10.1-7.0.1.el7.centos.x86_64 has missing requires of libmysqlclient.so.18()(64bit)
2:postfix-2.10.1-7.0.1.el7.centos.x86_64 has missing requires of libmysqlclient.so.18(libmysqlclient_18)(64bit)
  Installing : c-ares-1.10.0-3.el7.x86_64                                                                                                              1/2 
  Installing : c-ares-devel-1.10.0-3.el7.x86_64                                                                                                        2/2 
  Verifying  : c-ares-devel-1.10.0-3.el7.x86_64                                                                                                        1/2 
  Verifying  : c-ares-1.10.0-3.el7.x86_64                                                                                                              2/2 

Installed:
  c-ares-devel.x86_64 0:1.10.0-3.el7                                                                                                                       

Dependency Installed:
  c-ares.x86_64 0:1.10.0-3.el7                                                                                                                             

Complete!
[root@10-9-144-239 ~]# php -v
PHP 5.6.30 (cli) (built: Jun  5 2017 17:34:00) 
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend Guard Loader v3.3, Copyright (c) 1998-2014, by Zend Technologies

 

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

larance

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值