CentOS 7 – Resolve php71w-common Conflicts with php-common-5.4.16

centos7php7

I cant install php-bcmath via yum install php-bcmath because got this error message

Failed to set locale, defaulting to C
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos.netonboard.com
 * epel: mirror.vorboss.net
 * extras: centos.netonboard.com
 * updates: centos.netonboard.com
 * webtatic: sp.repo.webtatic.com
Resolving Dependencies
--> Running transaction check
---> Package php-bcmath.x86_64 0:5.4.16-45.el7 will be installed
--> Processing Dependency: php-common(x86-64) = 5.4.16-45.el7 for package: php-bcmath-5.4.16-45.el7.x86_64
--> Running transaction check
---> Package php-common.x86_64 0:5.4.16-45.el7 will be installed
--> Processing Dependency: libzip.so.2()(64bit) for package: php-common-5.4.16-45.el7.x86_64
--> Running transaction check
---> Package libzip.x86_64 0:0.10.1-8.el7 will be installed
--> Processing Conflict: php71w-common-7.1.22-1.w7.x86_64 conflicts php-common < 7.1
--> Finished Dependency Resolution
Error: php71w-common conflicts with php-common-5.4.16-45.el7.x86_64
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

How to remove completely the php-common-5.4.16-45.el7.x86_64 from my Centos 7? I'm using laravel 5 for my project. Please advice. Thank you.

Best Answer

Install php71w-bcmath instead of php-bcmath. php-bcmath belongs to PHP 5 and you seem to be using PHP 7.1.