【发布时间】:2015-12-08 01:40:49
【问题描述】:
参考文档:https://webtatic.com/packages/php70/
PHP 7.0.0 已于 2015 年 12 月 3 日在 PHP.net 上发布,并且也可用于 CentOS/RHEL 6.7 和 7.1 在 Webtatic 通过 Yum 的测试存储库中。
我在安装php7时出现以下错误:
[root]# yum install php70w php70w-opcache
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: ftp.riken.jp
* epel: ftp.riken.jp
* extras: ftp.riken.jp
* updates: ftp.riken.jp
* webtatic: sp.repo.webtatic.com
Resolving Dependencies
--> Running transaction check
---> Package php70w.x86_64 0:7.0.0-1.w6 will be installed
--> Processing Dependency: php70w-common(x86-64) = 7.0.0-1.w6 for package: php70w-7.0.0-1.w6.x86_64
--> Processing Dependency: php70w-cli(x86-64) = 7.0.0-1.w6 for package: php70w-7.0.0-1.w6.x86_64
--> Processing Dependency: php70w-cli = 7.0.0-1.w6 for package: php70w-7.0.0-1.w6.x86_64
--> Processing Dependency: httpd-mmn = 20051115 for package: php70w-7.0.0-1.w6.x86_64
---> Package php70w-opcache.x86_64 0:7.0.0-1.w6 will be installed
--> Running transaction check
---> Package php70w.x86_64 0:7.0.0-1.w6 will be installed
--> Processing Dependency: httpd-mmn = 20051115 for package: php70w-7.0.0-1.w6.x86_64
---> Package php70w-cli.x86_64 0:7.0.0-1.w6 will be installed
---> Package php70w-common.x86_64 0:7.0.0-1.w6 will be installed
--> Processing Dependency: libgmp.so.3()(64bit) for package: php70w-common-7.0.0-1.w6.x86_64
--> Processing Conflict: php70w-common-7.0.0-1.w6.x86_64 conflicts php-common < 5.5.0
--> Finished Dependency Resolution
Error: Package: php70w-7.0.0-1.w6.x86_64 (webtatic)
Requires: httpd-mmn = 20051115
Installed: httpd-2.4.6-31.el7.centos.1.x86_64 (@updates)
httpd-mmn = 20120211
httpd-mmn = 20120211x8664
httpd-mmn = 20120211-x86-64
Available: httpd-2.4.6-31.el7.centos.x86_64 (base)
httpd-mmn = 20120211x8664
httpd-mmn = 20120211-x86-64
httpd-mmn = 20120211
Error: php70w-common conflicts with php-common-5.4.16-36.el7_1.x86_64
Error: Package: php70w-common-7.0.0-1.w6.x86_64 (webtatic)
Requires: libgmp.so.3()(64bit)
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
如何在centOS7上安装php7?
【问题讨论】:
-
安装较旧的软件包绝不是一个好主意。如果您确实需要旧的
php,而这需要旧的httpd-mmn,请尝试yum downgrade php70w-7.0.0-1.w6.x86_64。如果这不起作用,请先尝试降级httpd*。或者尝试更换 php.ini最后的手段是在安装php70w之前删除已安装的php。 -
感谢您的想法 :) 在 centos7 上成功安装了 php7。解决==> 1。 yum clear -> 2.yum install yum-plugin-replace -> 3. php-common, php-xml replace -> 4. install php7