php72w-common conflicts with php-common-5.4.16-46.el7.x86_64 报错的解决
服务器上装的php版本是7.2的,但是yum默认安装的php都是 5.4 的,导致安装相关的依赖会有冲突,需要升级yum源。
.安装 epel+Remi 这两个源
Remi repository 是包含最新版本 PHP 和 MySQL 包的 Linux 源,由 Remi 提供维护
centos自带的yum就可以安装epel
yum install epel-release.noarch
安装remi的centos7的源
rpm -ivh http://rpms.famillecollet.com/enterprise/remi-release-7.rpm
这个remi的源安装后还需要修改一下,使其生效
vi /etc/yum.repos.d/remi-php??
需要使用哪个版本php,就修改哪个版本文件
例如:remi-php70.repo 代表php7.0的源
把红色行的注释去掉,蓝色行0改为1
[remi]
name=Remi's RPM repository for Enterprise Linux 6 - $basearch
#baseurl=http://rpms.remirepo.net/enterprise/6/remi/$basearch/
mirrorlist=http://rpms.remirepo.net/enterprise/6/remi/mirror
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
然后就可以安装新版本php了
yum install php
最新文章
全部分类