我无法使用yum安装任何与PHP相关的软件包 [英] I can't install any package related to PHP with yum

查看:177
本文介绍了我无法使用yum安装任何与PHP相关的软件包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法安装任何与软件包相关的PHP,但出现一个百胜错误:没有可用的PHP软件包
我的 PHP 版本在Centos 7上是5.4.37。我安装了remi用于其他目的,我认为该存储库与PHP版本不兼容,但是我不这样做。不知道如何解决。

I can't install any package related PHP, I get a yum error: No package php available. My PHP version is 5.4.37 on Centos 7. I installed remi for other purposes and I think that the repository is not compatible with PHP version but I don't know how to fix it.

[root@server ~]# sudo yum install php php-pear
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centosmirror.netcup.net
 * epel: mirrors.n-ix.net
 * extras: centosmirror.netcup.net
 * remi: mirror5.layerjet.com
 * remi-safe: mirror5.layerjet.com
 * updates: centosmirror.netcup.net
No package php available.
No package php-pear available.
Error: Nothing to do


推荐答案

,在yum配置中:

exclude=apache* httpd* mod_* mysql* MySQL* mariadb* da_* ftp exim* sendmail* php* bind-chroot* 

这很可能是启用面板的服务器(cpanel或其他) ,它提供了自己的PHP堆栈。

This is very probably a "panel" enabled server (cpanel or others), which provides its own PHP stack.

因此,根据设计,您不能从标准存储库或任何其他第三方存储库中安装 php *软件包。

So by design, you cannot install "php*" packages from standard repository or any other 3rd party repository. Such distribution is so altered, that it is often considered as "Not CentOS".

因此,最好向php堆栈提供程序询问如何更新它(如果可能,而不破坏面板应用程序)

So, better to ask your php stack provider for how to update it (if possible, without breaking the panel application)

这篇关于我无法使用yum安装任何与PHP相关的软件包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆