我正在尝试根据本教程为 php 安装 apc 扩展:http://2bits.com/articles/installing-php-apc-gnulinux-centos-5.html但无法成功运行第一个命令。以下是我得到的结果:
Loaded plugins: fastestmirror
Repository base is listed more than once in the configuration
Repository updates 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
Determining fastest mirrors
Plesk | 951 B 00:00
Plesk-Third-Party | 951 B 00:00
base | 1.1 kB 00:00
extras | 2.1 kB 00:00
updates | 1.9 kB 00:00
Excluding Packages in global exclude list
Finished
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-pear.noarch 1:1.4.9-6.el5 set to be updated
--> Processing Dependency: php-devel for package: php-pear
--> Running transaction check
---> Package php-devel.x86_64 0:5.1.6-27.el5_5.3 set to be updated
--> Processing Dependency: php = 5.1.6-27.el5_5.3 for package: php-devel
--> Processing Dependency: autoconf for package: php-devel
--> Processing Dependency: automake for package: php-devel
--> Running transaction check
---> Package autoconf.noarch 0:2.59-12 set to be updated
--> Processing Dependency: imake for package: autoconf
---> Package automake.noarch 0:1.9.6-2.3.el5 set to be updated
---> Package php-devel.x86_64 0:5.1.6-27.el5_5.3 set to be updated
--> Processing Dependency: php = 5.1.6-27.el5_5.3 for package: php-devel
--> Running transaction check
---> Package imake.x86_64 0:1.0.2-3 set to be updated
---> Package php-devel.x86_64 0:5.1.6-27.el5_5.3 set to be updated
--> Processing Dependency: php = 5.1.6-27.el5_5.3 for package: php-devel
--> Finished Dependency Resolution
php-devel-5.1.6-27.el5_5.3.x86_64 from base has depsolving problems
--> Missing Dependency: php = 5.1.6-27.el5_5.3 is needed by package php-devel-5.1.6-27.el5_5.3.x86_64 (base)
Error: Missing Dependency: php = 5.1.6-27.el5_5.3 is needed by package php-devel-5.1.6-27.el5_5.3.x86_64 (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-devel-5.1.6-27.el5_5.3.x86_64 from base has depsolving problems
--> Missing Dependency: php = 5.1.6-27.el5_5.3 is needed by package php-devel-5.1.6-27.el5_5.3.x86_64 (base)
Error: Missing Dependency: php = 5.1.6-27.el5_5.3 is needed by package php-devel-5.1.6-27.el5_5.3.x86_64 (base)
我认为这就是我无法在服务器上安装 apc 的原因。服务器运行的是 centos 5.6,带有 php 5.3.8。控制面板是 plesk 10。
答案1
您是如何安装 php-5.3.8 的?php-devel 包的版本必须与您安装的 php 匹配。首先安装相应的 php-devel,然后重试安装 php-pear。不过,我不知道该包是否会寻找特定版本的 php。如果是,您需要找到适合版本的 php-pear 包。