当我尝试yum install phpmyadmin
时出现此错误
Error: Package: php-gd-5.3.3-22.el6.x86_64 (base)
Requires: php-common(x86-64) = 5.3.3-22.el6
Installed: php-common-5.5.0-1.el6.remi.x86_64 (@remi-test)
php-common(x86-64) = 5.5.0-1.el6.remi
Available: php-common-5.3.3-22.el6.x86_64 (base)
php-common(x86-64) = 5.3.3-22.el6
You could try using --skip-broken to work around the problem
** Found 1 pre-existing rpmdb problem(s), 'yum check' output follows:
yum-3.2.29-40.el6.centos.noarch has missing requires of yum-plugin-fastestmirror
我需要做什么来修复这个错误
更新:
然后我得到这个
Repository epel is listed more than once in the configuration
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package phpMyAdmin.noarch 0:3.5.8.1-1.el6 will be installed
--> Processing Dependency: php-gd >= 5.2.0 for package: phpMyAdmin-3.5.8.1-1.el6.noarch
--> Processing Dependency: php-php-gettext for package: phpMyAdmin-3.5.8.1-1.el6.noarch
--> Running transaction check
---> Package php-gd.x86_64 0:5.3.3-22.el6 will be installed
--> Processing Dependency: php-common(x86-64) = 5.3.3-22.el6 for package: php-gd-5.3.3-22.el6.x86_64
---> Package php-php-gettext.noarch 0:1.0.11-3.el6 will be installed
Packages skipped because of dependency problems:
php-gd-5.3.3-22.el6.x86_64 from base
php-php-gettext-1.0.11-3.el6.noarch from epel
phpMyAdmin-3.5.8.1-1.el6.noarch from epel
答案1
php-common
第一个错误是因为您从remi-test
repo 安装了比该包所能处理的版本更高的 PHP(特别是包) php-gd
。解决初始问题的最简单方法是删除 repo remi-test
,降级到基本 repo 中提供的 php-common 版本,然后重新运行该yum install phpmyadmin
命令。
答案2
** 发现 1 个预先存在的 rpmdb 问题,“yum check”输出如下:yum-3.2.29-40.el6.centos.noarch 缺少 yum-plugin-fastestmirror 的要求
Yum 版本 3.2.49 需要 yum-plugin-fastermirror 包。似乎缺少了它。
您可以运行rpm -qa | grep fastestmirror
并更新您的答案。如果没有出现任何内容,请直接通过 rpm 安装 yum-plugin-fastestmirror。
有一个链接可以直接获取 rpmhttp://zid-lux1.uibk.ac.at/linux/rpm2html/centos/6/os/x86_64/Packages/yum-plugin-fastestmirror-1.1.30-14.el6.noarch.html