Error: php-mysql conflicts with php-mysqlnd-5.4.16-43.el7_4.x86_64

CentOS 7安装PHP时候报错,解决办法重新安装yum源有问题

[root@hos]# yum -y install php* php-mysql*

Loaded plugins: fastestmirror
base                                                     | 3.6 kB     00:00     
extras                                                   | 3.4 kB     00:00     
updates                                                  | 3.4 kB     00:00     
updates/7/x86_64/primary_db                                | 6.0 MB   00:00     
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package php.x86_64 0:5.4.16-43.el7_4 will be installed
---> Package php-bcmath.x86_64 0:5.4.16-43.el7_4 will be installed
---> Package php-cli.x86_64 0:5.4.16-43.el7_4 will be installed
---> Package php-common.x86_64 0:5.4.16-43.el7_4 will be installed
---> Package php-dba.x86_64 0:5.4.16-43.el7_4 will be installed
--> Processing Dependency: libtokyocabinet.so.9()(64bit) for package: php-dba-5.4.16-43.el7_4.x86_64
---> Package php-devel.x86_64 0:5.4.16-43.el7_4 will be installed
--> Processing Dependency: automake for package: php-devel-5.4.16-43.el7_4.x86_64
--> Processing Dependency: autoconf for package: php-devel-5.4.16-43.el7_4.x86_64
---> Package php-embedded.x86_64 0:5.4.16-43.el7_4 will be installed
---> Package php-enchant.x86_64 0:5.4.16-43.el7_4 will be installed
--> Processing Dependency: libenchant.so.1()(64bit) for package: php-enchant-5.4.16-43.el7_4.x86_64
---> Package php-fpm.x86_64 0:5.4.16-43.el7_4 will be installed
---> Package php-gd.x86_64 0:5.4.16-43.el7_4 will be installed
--> Processing Dependency: libt1.so.5()(64bit) for package: php-gd-5.4.16-43.el7_4.x86_64
---> Package php-intl.x86_64 0:5.4.16-43.el7_4 will be installed
--> Processing Dependency: libicuuc.so.50()(64bit) for package: php-intl-5.4.16-43.el7_4.x86_64
--> Processing Dependency: libicuio.so.50()(64bit) for package: php-intl-5.4.16-43.el7_4.x86_64
--> Processing Dependency: libicui18n.so.50()(64bit) for package: php-intl-5.4.16-43.el7_4.x86_64
--> Processing Dependency: libicudata.so.50()(64bit) for package: php-intl-5.4.16-43.el7_4.x86_64
---> Package php-ldap.x86_64 0:5.4.16-43.el7_4 will be installed
---> Package php-mbstring.x86_64 0:5.4.16-43.el7_4 will be installed
---> Package php-mysql.x86_64 0:5.4.16-43.el7_4 will be installed
--> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package: php-mysql-5.4.16-43.el7_4.x86_64
--> Processing Dependency: libmysqlclient.so.18()(64bit) for package: php-mysql-5.4.16-43.el7_4.x86_64
---> Package php-mysqlnd.x86_64 0:5.4.16-43.el7_4 will be installed
---> Package php-odbc.x86_64 0:5.4.16-43.el7_4 will be installed
---> Package php-pdo.x86_64 0:5.4.16-43.el7_4 will be installed
---> Package php-pear.noarch 1:1.9.4-21.el7 will be installed
---> Package php-pecl-memcache.x86_64 0:3.0.8-4.el7 will be installed
---> Package php-pgsql.x86_64 0:5.4.16-43.el7_4 will be installed
--> Processing Dependency: libpq.so.5()(64bit) for package: php-pgsql-5.4.16-43.el7_4.x86_64
---> Package php-process.x86_64 0:5.4.16-43.el7_4 will be installed
---> Package php-pspell.x86_64 0:5.4.16-43.el7_4 will be installed
--> Processing Dependency: libpspell.so.15()(64bit) for package: php-pspell-5.4.16-43.el7_4.x86_64
--> Processing Dependency: libaspell.so.15()(64bit) for package: php-pspell-5.4.16-43.el7_4.x86_64
---> Package php-recode.x86_64 0:5.4.16-43.el7_4 will be installed
--> Processing Dependency: librecode.so.0()(64bit) for package: php-recode-5.4.16-43.el7_4.x86_64
---> Package php-snmp.x86_64 0:5.4.16-43.el7_4 will be installed
--> Processing Dependency: net-snmp for package: php-snmp-5.4.16-43.el7_4.x86_64
--> Processing Dependency: libnetsnmp.so.31()(64bit) for package: php-snmp-5.4.16-43.el7_4.x86_64
---> Package php-soap.x86_64 0:5.4.16-43.el7_4 will be installed
---> Package php-xml.x86_64 0:5.4.16-43.el7_4 will be installed
--> Processing Dependency: libxslt.so.1(LIBXML2_1.0.24)(64bit) for package: php-xml-5.4.16-43.el7_4.x86_64
--> Processing Dependency: libxslt.so.1(LIBXML2_1.0.22)(64bit) for package: php-xml-5.4.16-43.el7_4.x86_64
--> Processing Dependency: libxslt.so.1(LIBXML2_1.0.18)(64bit) for package: php-xml-5.4.16-43.el7_4.x86_64
--> Processing Dependency: libxslt.so.1(LIBXML2_1.0.13)(64bit) for package: php-xml-5.4.16-43.el7_4.x86_64
--> Processing Dependency: libxslt.so.1(LIBXML2_1.0.11)(64bit) for package: php-xml-5.4.16-43.el7_4.x86_64
--> Processing Dependency: libxslt.so.1()(64bit) for package: php-xml-5.4.16-43.el7_4.x86_64
--> Processing Dependency: libexslt.so.0()(64bit) for package: php-xml-5.4.16-43.el7_4.x86_64
---> Package php-xmlrpc.x86_64 0:5.4.16-43.el7_4 will be installed
--> Running transaction check
---> Package aspell.x86_64 12:0.60.6.1-9.el7 will be installed
---> Package autoconf.noarch 0:2.69-11.el7 will be installed
--> Processing Dependency: m4 >= 1.4.14 for package: autoconf-2.69-11.el7.noarch
---> Package automake.noarch 0:1.13.4-3.el7 will be installed
--> Processing Dependency: perl(Thread::Queue) for package: automake-1.13.4-3.el7.noarch
--> Processing Dependency: perl(TAP::Parser) for package: automake-1.13.4-3.el7.noarch
---> Package enchant.x86_64 1:1.6.0-8.el7 will be installed
--> Processing Dependency: libhunspell-1.3.so.0()(64bit) for package: 1:enchant-1.6.0-8.el7.x86_64
---> Package libicu.x86_64 0:50.1.2-15.el7 will be installed
---> Package libxslt.x86_64 0:1.1.28-5.el7 will be installed
---> Package mariadb-libs.x86_64 1:5.5.56-2.el7 will be installed
---> Package net-snmp.x86_64 1:5.7.2-28.el7_4.1 will be installed
--> Processing Dependency: net-snmp-agent-libs = 1:5.7.2-28.el7_4.1 for package: 1:net-snmp-5.7.2-28.el7_4.1.x86_64
--> Processing Dependency: libsensors.so.4()(64bit) for package: 1:net-snmp-5.7.2-28.el7_4.1.x86_64
--> Processing Dependency: libnetsnmptrapd.so.31()(64bit) for package: 1:net-snmp-5.7.2-28.el7_4.1.x86_64
--> Processing Dependency: libnetsnmpmibs.so.31()(64bit) for package: 1:net-snmp-5.7.2-28.el7_4.1.x86_64
--> Processing Dependency: libnetsnmpagent.so.31()(64bit) for package: 1:net-snmp-5.7.2-28.el7_4.1.x86_64
---> Package net-snmp-libs.x86_64 1:5.7.2-28.el7_4.1 will be installed
---> Package postgresql-libs.x86_64 0:9.2.23-3.el7_4 will be installed
---> Package recode.x86_64 0:3.6-38.el7 will be installed
---> Package t1lib.x86_64 0:5.1.2-14.el7 will be installed
---> Package tokyocabinet.x86_64 0:1.4.48-3.el7 will be installed
--> Running transaction check
---> Package hunspell.x86_64 0:1.3.2-15.el7 will be installed
--> Processing Dependency: hunspell-en-US for package: hunspell-1.3.2-15.el7.x86_64
---> Package lm_sensors-libs.x86_64 0:3.4.0-4.20160601gitf9185e5.el7 will be installed
---> Package m4.x86_64 0:1.4.16-10.el7 will be installed
---> Package net-snmp-agent-libs.x86_64 1:5.7.2-28.el7_4.1 will be installed
---> Package perl-Test-Harness.noarch 0:3.28-3.el7 will be installed
---> Package perl-Thread-Queue.noarch 0:3.02-2.el7 will be installed
--> Running transaction check
---> Package hunspell-en-US.noarch 0:0.20121024-6.el7 will be installed
--> Processing Conflict: php-mysql-5.4.16-43.el7_4.x86_64 conflicts php-mysqlnd
--> Finished Dependency Resolution
Error: php-mysql conflicts with php-mysqlnd-5.4.16-43.el7_4.x86_64
 You could try using --skip-broken to work around the problem

 

 You could try running: rpm -Va --nofiles --nodigest

 

解决方案

下载repo文件 

wget http://mirrors.aliyun.com/repo/Centos-7.repo

备份并替换系统的repo文件

cp Centos-7.repo /etc/yum.repos.d/ 
cd /etc/yum.repos.d/ 
mv CentOS-Base.repo CentOS-Base.repo.bak 
mv Centos-7.repo CentOS-Base.repo

执行yum源更新命令

yum clean all 
yum makecache 
yum update

yum更新需要时间,更新完。在重新安装以下PHP环境。

来咱们测试以下PHP环境配置成功没有。去浏览器上输入IP

Error: php-mysql conflicts with php-mysqlnd-5.4.16-43.el7_4.x86_64_第1张图片

出来这个就是配置成功!

 

 

 

运维交流QQ群:

Error: php-mysql conflicts with php-mysqlnd-5.4.16-43.el7_4.x86_64_第2张图片

你可能感兴趣的:(Error: php-mysql conflicts with php-mysqlnd-5.4.16-43.el7_4.x86_64)