php7在centos7上的安装错误



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

PHP 7.0.0已于2015年12月3日在PHP.net上发布,也可通过Yum在Webstatic的测试库中获得Cents/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?

我发现依赖Remi的repos更容易/更安全http://rpms.famillecollet.com/而不是webstatic,而不是删除现有的包-这也是一个有效的解决方案。

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

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

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

最新更新