Mysql – Yum: php55w-common conflicts with php-common-5.4

centos7dependenciesMySQLPHP

I am trying to install mysqli on a CentOS machine using yum install php-mysqlnd.x86_64 on the command line but I keep getting the message:

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

Neither of the suggested workarounds do anything to help the problem.

Here is the full text that is shown when I try to install:

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

It looks like it is trying to install for php 5.4 instead of 5.5 which is the version I am needing to install for…

Any ideas on how I can get mysqli installed and working with php 5.5 on CentOs 7? I have tried following several guides, but I cannot get past the installation steps due to the dependency problems.

Best Answer

I had to install the rpms for php 5.5.

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

Then run:

sudo yum install php55w-mysqlnd.x86_64

Double check the php.ini file to make sure mysqli is enabled and restart httpd service with sudo systemctl restart httpd.service.

That should do it!