php-common 造成冲突

php-common 造成冲突

我正在尝试安装 php-pdo,但由于 php-common 总是失败

bash-3.2# yum install php-pdo
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * epel: fedora-epel.mirror.lstn.net
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-pdo.i386 0:5.1.6-40.el5_9 set to be updated
--> Processing Dependency: php-common = 5.1.6-40.el5_9 for package: php-pdo
--> Finished Dependency Resolution
php-pdo-5.1.6-40.el5_9.i386 from base has depsolving problems
  --> Missing Dependency: php-common = 5.1.6-40.el5_9 is needed by package php-pdo-5.1.6-40.el5_9.i386 (base)
Error: Missing Dependency: php-common = 5.1.6-40.el5_9 is needed by package php-pdo-5.1.6-40.el5_9.i386 (base)
 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-common 我得到:

bash-3.2# yum install php-common
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * epel: fedora-epel.mirror.lstn.net
Setting up Install Process
Package matching php-common-5.1.6-40.el5_9.i386 already installed. Checking for update.
Nothing to do

在这里和谷歌搜索过,但没有找到任何有用的方法

编辑:添加了新的存储库:

bash-3.2# yum install php-common
Loaded plugins: fastestmirror
Repository base is listed more than once in the configuration
Repository addons is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository contrib is listed more than once in the configuration
Loading mirror speeds from cached hostfile
 * addons: mirror.raystedman.net
 * base: mirror.5ninesolutions.com
 * centosplus: mirror.anl.gov
 * contrib: yum.singlehop.com
 * epel: fedora-epel.mirror.lstn.net
 * extras: centos.unmeteredvps.net
 * update: mirror.team-cymru.org
addons                                                   | 1.9 kB     00:00
base                                                     | 1.1 kB     00:00
centosplus                                               | 1.9 kB     00:00
centosplus/primary_db                                    |  53 kB     00:01
contrib                                                  | 1.9 kB     00:00
contrib/primary_db                                       | 1.1 kB     00:00
epel                                                     | 3.6 kB     00:00
extras                                                   | 2.1 kB     00:00
nginx                                                    | 2.5 kB     00:00
update                                                   | 1.9 kB     00:00
update/primary_db                                        |  84 kB     00:04
updates                                                  | 1.9 kB     00:00
Setting up Install Process
Package matching php-common-5.1.6-40.el5_9.i386 already installed. Checking for update.
Nothing to do

进而...

bash-3.2# yum install php-pdo
Loaded plugins: fastestmirror
Repository base is listed more than once in the configuration
Repository addons is listed more than once in the configuration
Repository extras is listed more than once in the configuration
Repository centosplus is listed more than once in the configuration
Repository contrib is listed more than once in the configuration
Loading mirror speeds from cached hostfile
 * addons: mirror.raystedman.net
 * base: centos.mirror.lstn.net
 * centosplus: mirror.anl.gov
 * contrib: yum.singlehop.com
 * epel: fedora-epel.mirror.lstn.net
 * extras: centos.unmeteredvps.net
 * update: mirrors.loosefoot.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-pdo.i386 0:5.1.6-40.el5_9 set to be updated
--> Processing Dependency: php-common = 5.1.6-40.el5_9 for package: php-pdo
--> Finished Dependency Resolution
php-pdo-5.1.6-40.el5_9.i386 from base has depsolving problems
  --> Missing Dependency: php-common = 5.1.6-40.el5_9 is needed by package php-pdo-5.1.6-40.el5_9.i386 (base)
Error: Missing Dependency: php-common = 5.1.6-40.el5_9 is needed by package php-pdo-5.1.6-40.el5_9.i386 (base)
 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.

答案1

看起来您已禁用除“epel”之外的所有存储库。如果要让 yum 正常工作,您必须启用“base”和“updates”。

并且您应该在 CentOS5 上切换到 php53* 包。

答案2

对于遇到同样问题的人,请按照此网站上的步骤操作:http://www.rackspace.com/knowledge_center/article/how-to-installupgrade-php-53-for-centos-5x

它对我有用。

相关内容