yum install php81-php-snmp 安装报错 Requires: libmysqlclient.so.18

[root@VM-0-11-centos ~]# yum install php81-php-snmp
Loaded plugins: fastestmirror, langpacks
Repository epel is listed more than once in the configuration
Loading mirror speeds from cached hostfile
* remi-php74: mirrors.tuna.tsinghua.edu.cn
* remi-safe: mirrors.tuna.tsinghua.edu.cn
Resolving Dependencies
–> Running transaction check
—> Package php81-php-snmp.x86_64 0:8.1.8-1.el7.remi will be installed
–> Processing Dependency: net-snmp for package: php81-php-snmp-8.1.8-1.el7.remi.x86_64
–> Running transaction check
—> Package net-snmp.x86_64 1:5.7.2-49.el7_9.2 will be installed
–> Processing Dependency: net-snmp-agent-libs = 1:5.7.2-49.el7_9.2 for package: 1:net-snmp-5.7.2-49.el7_9.2.x86_64
–> Processing Dependency: libnetsnmptrapd.so.31()(64bit) for package: 1:net-snmp-5.7.2-49.el7_9.2.x86_64
–> Processing Dependency: libnetsnmpmibs.so.31()(64bit) for package: 1:net-snmp-5.7.2-49.el7_9.2.x86_64
–> Processing Dependency: libnetsnmpagent.so.31()(64bit) for package: 1:net-snmp-5.7.2-49.el7_9.2.x86_64
–> Processing Dependency: libmysqlclient.so.18()(64bit) for package: 1:net-snmp-5.7.2-49.el7_9.2.x86_64
–> Running transaction check
—> Package mariadb-libs.x86_64 1:5.5.68-1.el7 will be installed
—> Package net-snmp-agent-libs.x86_64 1:5.7.2-49.el7_9.2 will be installed
Removing mariadb-libs.x86_64 1:5.5.68-1.el7 – u due to obsoletes from installed mysql-community-libs-5.7.38-1.el7.x86_64
–> Restarting Dependency Resolution with new changes.
–> Running transaction check
—> Package mariadb-libs.x86_64 1:5.5.68-1.el7 will be installed
–> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package: 1:net-snmp-agent-libs-5.7.2-49.el7_9.2.x86_64
–> Processing Dependency: libmysqlclient.so.18()(64bit) for package: 1:net-snmp-5.7.2-49.el7_9.2.x86_64
–> Processing Dependency: libmysqlclient.so.18()(64bit) for package: 1:net-snmp-agent-libs-5.7.2-49.el7_9.2.x86_64
–> Finished Dependency Resolution
Error: Package: 1:net-snmp-5.7.2-49.el7_9.2.x86_64 (updates)
Requires: libmysqlclient.so.18()(64bit)
Error: Package: 1:net-snmp-agent-libs-5.7.2-49.el7_9.2.x86_64 (updates)
Requires: libmysqlclient.so.18(libmysqlclient_18)(64bit)
Error: Package: 1:net-snmp-agent-libs-5.7.2-49.el7_9.2.x86_64 (updates)
Requires: libmysqlclient.so.18()(64bit)
You could try using –skip-broken to work around the problem
You could try running: rpm -Va –nofiles –nodigest

 

解决:

下载安装你对应的mysql-community-libs-compat版本:

查看mysql版本:

[root@VM-0-11-centos ~]# mysql -V
mysql Ver 14.14 Distrib 5.7.38, for Linux (x86_64) using EditLine wrapper

下载对应版本的mysql-community-libs-compat:

[root@VM-0-11-centos ~]# wget https://repo.mysql.com/yum/mysql-5.7-community/el/7/x86_64/mysql-community-libs-compat-5.7.38-1.el7.x86_64.rpm

安装:

[root@VM-0-11-centos ~]# rpm -ivh mysql-community-libs-compat-5.7.38-1.el7.x86_64.rpm

之后在运行:

[root@VM-0-11-centos ~]# yum install php81-php-snmp

就不报错了。

相关文章