如何在 centos 5.3 上下载 php53 (我之前已经安装过 php54)

如何在 centos 5.3 上下载 php53 (我之前已经安装过 php54)

我想在 centos5.3 上安装 php53(之前安装过 php54 但已删除)我按如下方式操作。

  1. sudo yum 删除 php php-common php-cli
  2. sudo yum 安装 php53
  3. sudo yum 安装 zabbix-web-mysql

但是当我尝试最后一件事时,它显示以下错误:

Installed: php53.x86_64 0:5.3.3-26.el5_11
Dependency Installed: php53-cli.x86_64 0:5.3.3-26.el5_11 php53-common.x86_64 0:5.3.3-26.el5_11
Complete!
[root@QCacti ~]# sudo yum install zabbix-web-mysql
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * epel: ftp.jaist.ac.jp
 * atomic: mirrors.neusoft.edu.cn
 * rpmforge: ftp.riken.jp
 * base: centos.mirror.cdnetworks.com
 * updates: centos.mirror.cdnetworks.com
 * extras: centos.mirror.cdnetworks.com
 * addons: centos.mirror.cdnetworks.com
Excluding Packages from CentOS / Red Hat Enterprise Linux 5 - atomicrocketturtle.com
Finished
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package zabbix-web-mysql.x86_64 0:2.4.7-1.el5 set to be updated
--> Processing Dependency: zabbix-web = 2.4.7-1.el5 for package: zabbix-web-mysql
--> Processing Dependency: php-mysql for package: zabbix-web-mysql
--> Running transaction check
---> Package zabbix-web.x86_64 0:2.4.7-1.el5 set to be updated
--> Processing Dependency: php53-bcmath for package: zabbix-web
--> Processing Dependency: php53-gd for package: zabbix-web
--> Processing Dependency: php53-mbstring for package: zabbix-web
--> Processing Dependency: php53-xml for package: zabbix-web
---> Package php-mysql.x86_64 0:5.1.6-45.el5_11 set to be updated
--> Processing Dependency: php-common = 5.1.6-45.el5_11 for package: php-mysql
--> Processing Dependency: php-pdo for package: php-mysql
--> Running transaction check
---> Package php53-xml.x86_64 0:5.3.3-26.el5_11 set to be updated
---> Package php-common.x86_64 0:5.1.6-45.el5_11 set to be updated
---> Package php-pdo.x86_64 0:5.1.6-45.el5_11 set to be updated
---> Package php53-gd.x86_64 0:5.3.3-26.el5_11 set to be updated
---> Package php53-bcmath.x86_64 0:5.3.3-26.el5_11 set to be updated
---> Package php53-mbstring.x86_64 0:5.3.3-26.el5_11 set to be updated
--> Processing Conflict: php53-common conflicts php-common
--> Finished Dependency Resolution
php53-common-5.3.3-26.el5_11.x86_64 from installed has depsolving problems
  --> php53-common conflicts with php-common
Error: php53-common conflicts with php-common

答案1

您确定安装的是 PHP 5.3,而不仅仅是 PHP 吗?

尝试关注本指南并在安装过程中指定 php 版本,例如:

yum install php53 php53-cli php53-common php53-gd php53-imap php53-intl php53-mbstring php53-mysql php53-odbc php53-pdo php53-pspell php53-snmp php53-xml php53-xmlrpc

另外,在降级之前,您应该删除 php54,因为您很遗憾一直在使用:

rpm -qa | grep -i php
yum remove php
yum remove php-cli
yum remove php-pdo
yum remove php-common
yum remove <other php packages>

现在zabbix-web-mysql您尝试安装的版本依赖于 php5.4。它不支持 PHP 5.3,但是您可以尝试从不带依赖项的 RPM 包安装它:

wget http://repo.zabbix.com/zabbix/2.4/rhel/5/x86_64/zabbix-web-mysql-2.4.7-1.el5.x86_64.rpm
wget http://repo.zabbix.com/zabbix/2.4/rhel/5/x86_64/zabbix-web-2.4.7-1.el5.x86_64.rpm
rpm -ivh --nodeps zabbix-web-2.4.7-1.el5.x86_64.rpm zabbix-web-mysql-2.4.7-1.el5.x86_64.rpm`

但是我,你为什么要使用五年前CentOS 5.3就应该升级的东西呢?5.11

你应该考虑在 CentOS 7 上安装 zabbix

相关内容