大网数据广告活动
服务器运维问答

PHP 7 conflicts with PHP 5 (Centos 7)

· 52CE 我爱测

Trying to install PHP 7 now that it's available; (on centos 7) added repo's: 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 i…

问题原文

原帖链接 · Wesley · CC BY-SA 3.0

Trying to install PHP 7 now that it's available;

(on centos 7)

added repo's:

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 installed via:

yum install php70w php70w-opcache

Output is:

[root@host]# yum install php70w php70w-opcache
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.advancedhosters.com
* epel: mirror.symnds.com
* extras: mirror.netdepot.com
* updates: mirrors.rit.edu
* webtatic: us-east.repo.webtatic.com
Resolving Dependencies
--> Running transaction check
---> Package php70w.x86_64 0:7.0.2-1.w7 will be installed
--> Processing Dependency: php70w-common(x86-64) = 7.0.2-1.w7 for package: php70w-7.0.2-1.w7.x86_64
--> Processing Dependency: php70w-cli(x86-64) = 7.0.2-1.w7 for package: php70w-7.0.2-1.w7.x86_64
--> Processing Dependency: php70w-cli = 7.0.2-1.w7 for package: php70w-7.0.2-1.w7.x86_64
---> Package php70w-opcache.x86_64 0:7.0.2-1.w7 will be installed
--> Running transaction check
---> Package php70w-cli.x86_64 0:7.0.2-1.w7 will be installed
---> Package php70w-common.x86_64 0:7.0.2-1.w7 will be installed
--> Processing Conflict: php70w-common-7.0.2-1.w7.x86_64 conflicts php-common < 5.5.0
--> Finished Dependency Resolution
Error: php70w-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

So the problem is : Error: php70w-common conflicts with php-common-5.4.16-36.el7_1.x86_64

How to fix this? I need both versions running simultaneously.

已采纳解答

原帖链接 · user9517 · CC BY-SA 3.0

You can install php7 for C7 (and others) as a Software Collection (scl) This installs alongside the system provided php 5 and is entirely independent of it. You can find the php7 scl on the REMI repo. You may also be interested in this Q&A on SF.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2016-01-25)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。