无法在CentOS上安装PHP包

前端之家收集整理的这篇文章主要介绍了无法在CentOS上安装PHP包前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我无法在我的数字海洋托管的服务器上通过yum重新安装 PHP.

我安装了PHP 5.4但想要5.6.我添加/启用了remi repo,运行yum -y删除PHP *然后尝试重新安装PHP.

当我运行yum -y install PHP时,我得到以下内容

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.centos.webair.com
 * epel: mirrors.coreix.net
 * extras: mirrors.centos.webair.com
 * remi: remi.check-update.co.uk
 * remi-PHP56: remi.check-update.co.uk
 * updates: mirrors.centos.webair.com
 * webtatic: uk.repo.webtatic.com
Resolving Dependencies
--> Running transaction check
---> Package PHP.x86_64 0:5.6.8-1.el6.remi will be installed
--> Processing Dependency: PHP-common(x86-64) = 5.6.8-1.el6.remi for package: PHP-5.6.8-1.el6.remi.x86_64
--> Processing Dependency: PHP-cli(x86-64) = 5.6.8-1.el6.remi for package: PHP-5.6.8-1.el6.remi.x86_64
--> Processing Dependency: httpd-mmn = 20051115 for package: PHP-5.6.8-1.el6.remi.x86_64
--> Running transaction check
---> Package PHP.x86_64 0:5.6.8-1.el6.remi will be installed
--> Processing Dependency: httpd-mmn = 20051115 for package: PHP-5.6.8-1.el6.remi.x86_64
---> Package PHP-cli.x86_64 0:5.6.8-1.el6.remi will be installed
---> Package PHP-common.x86_64 0:5.6.8-1.el6.remi will be installed
--> Processing Dependency: PHP-pecl-zip(x86-64) for package: PHP-common-5.6.8-1.el6.remi.x86_64
--> Processing Dependency: PHP-pecl-jsonc(x86-64) for package: PHP-common-5.6.8-1.el6.remi.x86_64
--> Running transaction check
---> Package PHP.x86_64 0:5.6.8-1.el6.remi will be installed
--> Processing Dependency: httpd-mmn = 20051115 for package: PHP-5.6.8-1.el6.remi.x86_64
---> Package PHP-pecl-jsonc.x86_64 0:1.3.7-1.el6.remi.5.6 will be installed
---> Package PHP-pecl-zip.x86_64 0:1.12.5-1.el6.remi.5.6 will be installed
--> Finished Dependency Resolution
Error: Package: PHP-5.6.8-1.el6.remi.x86_64 (remi-PHP56)
           Requires: httpd-mmn = 20051115
           Installed: httpd-2.4.6-31.el7.centos.x86_64 (@base)
               httpd-mmn = 20120211
               httpd-mmn = 20120211x8664
               httpd-mmn = 20120211-x86-64
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

我一直关注this tutorial

我有点卡住了.我试过删除httpd,重新安装httpd,似乎没有解决这个问题.当我禁用remi并尝试安装PHP 5.4时,我甚至会收到错误.

关于从哪里去的任何想法?

我正在运行CentOS Linux 7.1.1503版(核心版)

我修好了它!问题是我安装了错误的EL版本.
删除了所有额外的repo,删除了所有的PHP包,删除了httpd.
如下:
yum install epel-release
rpm -Uvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
yum clean
yum update

然后我可以使用以下方法安装PHP

yum install PHP56w PHP56w-opcache PHP56w-mcrypt PHP56w-pdo PHP56w-MysqL
原文链接:https://www.f2er.com/centos/373305.html

猜你在找的CentOS相关文章