centos7 安装php7遇到的问题

环境中安装过php 5.4,觉得版本太低了,因此删除旧版本安装了新版本

 

1. 安装epel-release

通过命令:

rpm -ivh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-9.noarch.rpm

(这个大家可以访问http://dl.fedoraproject.org/pub/epel/7/x86_64/e/ 目录,下载epel-release-XXX.noarch.rpm的最新版本)

成功安装。

2.  安装PHP7

终端再次运行如下命令:

rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm

成功获取PHP7的yum源,然后再执行:

yum install php70w

 

执行报错:

Resolving Dependencies
--> Running transaction check
---> Package php70w.x86_64 0:7.0.20-1.w6 will be installed
--> Processing Dependency: php70w-common(x86-64) = 7.0.20-1.w6 for package: php70w-7.0.20-1.w6.x86_64
--> Processing Dependency: php70w-cli(x86-64) = 7.0.20-1.w6 for package: php70w-7.0.20-1.w6.x86_64
--> Processing Dependency: php70w-cli = 7.0.20-1.w6 for package: php70w-7.0.20-1.w6.x86_64
--> Processing Dependency: httpd-mmn = 20051115 for package: php70w-7.0.20-1.w6.x86_64
--> Running transaction check
---> Package php70w.x86_64 0:7.0.20-1.w6 will be installed
--> Processing Dependency: httpd-mmn = 20051115 for package: php70w-7.0.20-1.w6.x86_64
---> Package php70w-cli.x86_64 0:7.0.20-1.w6 will be installed
---> Package php70w-common.x86_64 0:7.0.20-1.w6 will be installed
--> Processing Dependency: libgmp.so.3()(64bit) for package: php70w-common-7.0.20-1.w6.x86_64
--> Finished Dependency Resolution
Error: Package: php70w-common-7.0.20-1.w6.x86_64 (webtatic)
Requires: libgmp.so.3()(64bit)
Error: Package: php70w-7.0.20-1.w6.x86_64 (webtatic)
Requires: httpd-mmn = 20051115
Installed: httpd-2.4.6-45.el7.centos.4.x86_64 (@updates)
httpd-mmn = 20120211
httpd-mmn = 20120211x8664
httpd-mmn = 20120211-x86-64
Available: httpd-2.4.6-45.el7.centos.x86_64 (base)
httpd-mmn = 20120211x8664
httpd-mmn = 20120211-x86-64
httpd-mmn = 20120211
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest

执行yum clean all 清除缓存后,

 

再次执行 

yum install php70w

 

安装成功~

posted @ 2017-06-23 15:44  qsx_suzy  阅读(7608)  评论(1编辑  收藏  举报