百胜:php55w-与php-common-5.4常见冲突

我试图在命令行上使用yum install php-mysqlnd.x86_64在CentOS机器上安装mysqli ,但是我不断收到消息:

 Error: php55w-common conflicts with php-common-5.4.16-36.el7_1.x86_64 You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest 

build议的解决方法都不能解决问题。

以下是我尝试安装时显示的全文:

sudo yum install php-mysqlnd.x86_64 Loaded plugins: fastestmirror, replace Loading mirror speeds from cached hostfile * base: mirror.acsnet.com * extras: mirrors.chkhosting.com * rpmforge: mirror.webnx.com * updates: mirror.netdepot.com Resolving Dependencies --> Running transaction check ---> Package php-mysqlnd.x86_64 0:5.4.16-36.el7_1 will be installed --> Processing Dependency: php-pdo(x86-64) = 5.4.16-36.el7_1 for package: php-mysqlnd-5.4.16-36.el7_1.x86_64 --> Running transaction check ---> Package php-pdo.x86_64 0:5.4.16-36.el7_1 will be installed --> Processing Dependency: php-common(x86-64) = 5.4.16-36.el7_1 for package: php-pdo-5.4.16-36.el7_1.x86_64 --> Running transaction check ---> Package php-common.x86_64 0:5.4.16-36.el7_1 will be installed --> Processing Conflict: php55w-common-5.5.26-1.w7.x86_64 conflicts php-common < 5.5.0 --> Finished Dependency Resolution Error: php55w-common conflicts with php-common-5.4.16-36.el7_1.x86_64 You could try using --skip-broken to work around the problem You could try running: rpm -Va --nofiles --nodigest

它看起来像它试图安装为PHP 5.4而不是5.5,这是我需要安装的版本…

关于如何安装mysqli和在CentOS 7上使用php 5.5的任何想法? 我已经尝试了以下几个指南,但由于依赖性问题,我无法通过安装步骤。

我不得不安装的PHP 5.5的RPM。

 rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm 

然后运行:

 sudo yum install php55w-mysqlnd.x86_64 

仔细检查php.ini文件以确保启用mysqli,并使用sudo systemctl restart httpd.service重新启动httpd服务。

这应该做到这一点!