gpt4 book ai didi

php - 我无法使用 yum 安装任何与 PHP 相关的软件包

转载 作者:行者123 更新时间:2023-12-01 10:37:55 24 4
gpt4 key购买 nike

我无法安装任何与 PHP 相关的软件包,出现 yum 错误:No package php available .
我的 PHP Centos 7 上的版本是 5.4.37。我出于其他目的安装了 remi,我认为存储库与 PHP 版本不兼容,但我不知道如何修复它。

[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 堆栈。

因此,按照设计,您不能从标准存储库或任何其他 3rd 方存储库安装“php*”包。这样的发行版被改变得如此之大,以至于它通常被认为是“非 CentOS”。

因此,最好询问您的 php 堆栈提供者如何更新它(如果可能,在不破坏面板应用程序的情况下)

关于php - 我无法使用 yum 安装任何与 PHP 相关的软件包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32546527/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com