PHP installation conflicts on Centos6

喜夏-厌秋 提交于 2019-11-30 20:37:59

Solved it by removing all php using "yum remove php php-common"

and modified the filename "remi.repo" under the folder /etc/yum.repos.d like below:

[remi-php56]
name=Remi's PHP 5.6 RPM repository for Enterprise Linux 6 - $basearch
#baseurl=http://rpms.remirepo.net/enterprise/6/php56/$basearch/
mirrorlist=http://rpms.remirepo.net/enterprise/6/php56/mirror
# WARNING: If you enable this repository, you must also enable "remi"
enabled=1
gpgcheck=1

making sure that php56 is enabled=1.

Go to /etc/yum.repos.d. Remove the extra repository that you can see in your complete error message. Nima

If you are using Centos 6.7 and have php 5.6 installed, the following command worked for me:

sudo yum install php56w-pecl-xdebug.x86_64 (I was installing xdebug, not GD)

I found this by running yum search php56

You should run:

yum install php56w-gd

So when install php-extension have error:

*-common conflicts with php-common-5.3.3-46.el6_6.x86_64

Just type *-extension

Example:

yum install php-fpm have error

Error: php56u-common conflicts with php-common-5.3.3-46.el6_7.1.x86_64

then you should run

yum install php56u-fpm

The reason of this error is you install a php version don't match the system repo version. So yum get a version of the system repo, but this don't compatible with the php version you have installed. When you specific the php version, yum get the right version, so happy!

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!