3

参考文档:https ://webtatic.com/packages/php70/

PHP 7.0.0 已于 2015 年 12 月 3 日在 PHP.net 上发布,并且还可以通过 Yum 在其测试存储库中的 Webtatic 上用于 CentOS/RHEL 6.7 和 7.1。

在 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?

4

1 回答 1

2

我发现依靠 Remi 的 repos http://rpms.famillecollet.com/而不是 webtatic 比删除现有软件包更容易/更安全——这也是一个有效的解决方案。

这就是为我解决的问题(选择离你最近的镜子):

rpm -Uvh http://mirror.innosol.asia/remi/enterprise/remi-release-7.rpm
yum install php70
yum install php70-php-mysqlnd php70-php-devel php70-php-gd php70-php-mcrypt php70-php-mbstring php70-php-pear php70-php-pecl-imagick php70-php-pecl-zip

请注意,这是开发服务器所需要的

于 2016-09-26T05:23:35.757 回答