如何强制CentOS yum使用已经安装的软件包依赖项的更高版本(php-common作为php-xml的依赖项)

这似乎是我的php-common-5.2.10-1.el5.centos的版本比被要求作为php-xml的依赖的新版本,当我尝试使用yum install php-xml php-xml yum install php-xml 。 要求的相关软件包是php-common = 5.1.6-34.el5_8 ,如rpm -qa |grep php

那么我将如何强制php-xml使用我已经拥有的更高版本?

(这似乎是在相关的SF问题的问题的根源: php-xml安装抱怨的依赖php-common但已经安装(CentOS) )

更新

输出:

  • yum repolist
  • rpm -qi php-common

(按照@ewwhite的要求)如下:

 [root@dtsrvishvt2 ~]# yum repolist Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: centos.mirroring.pulsant.co.uk * extras: centos.mirroring.pulsant.co.uk * updates: centos.mirroring.pulsant.co.uk Reducing CentOS-5 Testing to included packages only Finished repo id repo name status base CentOS-5 - Base 2,725 c5-testing CentOS-5 Testing 0+71 extras CentOS-5 - Extras 280 updates CentOS-5 - Updates 379 repolist: 3,384 [root@dtsrvishvt2 ~]# [root@dtsrvishvt2 ~]# rpm -qi php-common Name : php-common Relocations: (not relocatable) Version : 5.2.10 Vendor: CentOS Release : 1.el5.centos Build Date: Fri 13 Nov 2009 04:36:29 PM GMT Install Date: Tue 13 Jul 2010 11:33:44 AM GMT Build Host: builder10.centos.org Group : Development/Languages Source RPM: php-5.2.10-1.el5.centos.src.rpm Size : 668395 License: PHP Signature : DSA/SHA1, Fri 22 Jan 2010 03:22:25 PM GMT, Key ID 5c37c0b17203f491 URL : http://www.php.net/ Summary : Common files for PHP Description : The php-common package contains files used by both the php package and the php-cli package. [root@dtsrvishvt2 ~]# 

你能提供以下命令的输出吗?

  • yum repolist
  • rpm -qi php-common

目前版本的CentOS 5系统的php-common-5.1.6-34.el5_8php-common-5.1.6-34.el5_8 。 您的依赖性问题源自于标准CentOS存储库中可用的较新版本的php-common(5.2.10-1.el5.centos)。 yum repolist命令将帮助我们理解你从哪里拉你的软件包。 rpm -qi php-common将显示当前安装的软件包的实际来源。

我的猜测是系统被转移到PHP 5.2使用另一个回购,或者可能通过手动软件包安装。 这已经通过使用CentOStesting库在线logging。 如果你的php-common包是一次性的安装,那么你应该可以抓取相关的php包…但这取决于你的repolist输出…

你不能,百胜不会让你。 php-xml的作者特别想要一个与它们匹配的php-common版本。

您的select是:

  1. 查找更新版本的php-xml rpm
  2. 将php-common降级到版本5.2.10-1.el5.centos
  3. 使用rpm -i --nodeps执行不安全的安装,可能无法正常工作(因为您没有安装任何依赖项)。
  4. 重buildphp-xml rpm,改变它所依赖的php-commons的版本

我强烈build议前两个之一,因为它们是最简单的,并有正确工作的最佳机会。

您不能使用php-commons版本5.2 *,因为它已被删除,由于安全问题。 剩下的唯一select是升级到PHP 5.3。 我花了大约4个小时在网上find这个信息,所以希望这会帮助别人。