Centos

無法在 CentOS 5.6 上安裝 php-posix 軟體包

  • May 21, 2012

我在 CentOS 5.6 主機上安裝了以下 PHP 包,我正在嘗試安裝php-posix. 當我執行時,yum install php-posix我收到一條錯誤消息,指出php53-commonphp-common.

[root@dev ~]# yum list installed | grep php
php.x86_64                               5.3.10-1.w5                   installed
php-cli.x86_64                           5.3.10-1.w5                   installed
php-common.x86_64                        5.3.10-1.w5                   installed
php-devel.x86_64                         5.3.10-1.w5                   installed
php-gd.x86_64                            5.3.10-1.w5                   installed
php-ldap.x86_64                          5.3.10-1.w5                   installed
php-mcrypt.x86_64                        5.3.10-1.w5                   installed
php-mysql.x86_64                         5.3.10-1.w5                   installed
php-pdo.x86_64                           5.3.10-1.w5                   installed
php-pear.noarch                          1:1.9.4-1.w5                  installed
php-soap.x86_64                          5.3.10-1.w5                   installed
php-xml.x86_64                           5.3.10-1.w5                   installed


[root@dev ~]# yum install php-posix
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.krystal.co.uk
* epel: ftp.uni-koeln.de
* extras: mirror.krystal.co.uk
* rpmforge: mirror.nl.leaseweb.net
* updates: mirror.krystal.co.uk
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php53-process.x86_64 0:5.3.3-7.el5_8 set to be updated
--> Processing Dependency: php53-common = 5.3.3-7.el5_8 for package: php53-process
--> Running transaction check
---> Package php53-common.x86_64 0:5.3.3-7.el5_8 set to be updated
--> Processing Conflict: php53-common conflicts php-common
--> Finished Dependency Resolution
php53-common-5.3.3-7.el5_8.x86_64 from updates has depsolving problems
 --> php53-common conflicts with php-common
Error: php53-common conflicts with php-common
You could try using --skip-broken to work around the problem
You could try running: package-cleanup --problems
                       package-cleanup --dupes
                       rpm -Va --nofiles --nodigest
The program package-cleanup is found in the yum-utils package.

是什麼阻止我安裝php-posix

我已經得到了解決方案,我所做的是:

yum install php-process --enablerepo=webtatic

雖然,它更新了我所有的 PHP 包到 5.3.13

該錯誤是由於php-common53包與已安裝的包衝突引起的php-common。該php-common53軟體包是 5.3.3 版本,而安裝的php軟體包是 5.3.10。安裝的php軟體包可能來自 EPEL 或 RPMForge 儲存庫。你可以通過執行找到yum info php

您必須刪除php-common依賴包,然後安裝php53-common. 如果儲存庫中沒有對應的 PHP 包,您可能會失去目前安裝的一些 PHP 包。

# yum remove  php php-cli php-common php-devel php-gd php-ldap php-mcrypt php-mysql php-pdo php-pear php-soap php-xml

安裝時,會自動安裝和php-posix等依賴包。php53``php53-common

# yum install php-posix

您應該知道,如果您不小心,啟用 EPEL 和 RPMForge 儲存庫中的一個或兩個可能會導致問題。熟悉yum命令(例如 –enablerepo 和 –disablerepo)和一些可用的外掛(yum-plugin-protect-packages 和 yum-plugin-protectbase),以幫助管理軟體並保持儲存庫執行良好。

引用自:https://unix.stackexchange.com/questions/38948