好吧,我试图在 CentOS 7(64 位)上安装 phpMyAdmin,但发生了这种情况。
这里有一个输出的 Pastebinyum install phpmyadmin
因为无法使代码工作。
[root@ftb ~]# yum install phpmyadmin
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: repos.dfw.quadranet.com
* epel: fedora-epel.mirror.lstn.net
* extras: centos.host-engine.com
* updates: centos.arvixe.com
Resolving Dependencies
--> Running transaction check
---> Package phpMyAdmin.noarch 0:4.0.10.8-1.el6 will be installed
--> Processing Dependency: php-mcrypt >= 5.2.0 for package: phpMyAdmin-4.0.10.8-1.el6.noarch
--> Processing Dependency: php-mbstring >= 5.2.0 for package: phpMyAdmin-4.0.10.8-1.el6.noarch
--> Processing Dependency: php-gd >= 5.2.0 for package: phpMyAdmin-4.0.10.8-1.el6.noarch
--> Processing Dependency: php-xmlwriter for package: phpMyAdmin-4.0.10.8-1.el6.noarch
--> Processing Dependency: php-tcpdf-dejavu-sans-fonts for package: phpMyAdmin-4.0.10.8-1.el6.noarch
--> Processing Dependency: php-tcpdf for package: phpMyAdmin-4.0.10.8-1.el6.noarch
--> Processing Dependency: php-php-gettext for package: phpMyAdmin-4.0.10.8-1.el6.noarch
--> Running transaction check
---> Package php-gd.x86_64 0:5.4.16-23.el7_0.3 will be installed
--> Processing Dependency: libt1.so.5()(64bit) for package: php-gd-5.4.16-23.el7_0.3.x86_64
--> Processing Dependency: libXpm.so.4()(64bit) for package: php-gd-5.4.16-23.el7_0.3.x86_64
---> Package php-mbstring.x86_64 0:5.4.16-23.el7_0.3 will be installed
---> Package php-mcrypt.x86_64 0:5.3.3-3.el6 will be installed
--> Processing Dependency: php(zend-abi) = 20090626 for package: php-mcrypt-5.3.3-3.el6.x86_64
--> Processing Dependency: php(api) = 20090626 for package: php-mcrypt-5.3.3-3.el6.x86_64
--> Processing Dependency: libmcrypt.so.4()(64bit) for package: php-mcrypt-5.3.3-3.el6.x86_64
---> Package php-php-gettext.noarch 0:1.0.11-3.el6 will be installed
---> Package php-tcpdf.noarch 0:6.2.4-1.el6 will be installed
--> Processing Dependency: php-tidy for package: php-tcpdf-6.2.4-1.el6.noarch
--> Processing Dependency: php-bcmath for package: php-tcpdf-6.2.4-1.el6.noarch
---> Package php-tcpdf-dejavu-sans-fonts.noarch 0:6.2.4-1.el6 will be installed
--> Processing Dependency: dejavu-sans-fonts for package: php-tcpdf-dejavu-sans-fonts-6.2.4-1.el6.noarch
---> Package php-xml.x86_64 0:5.4.16-23.el7_0.3 will be installed
--> Running transaction check
---> Package dejavu-sans-fonts.noarch 0:2.33-6.el7 will be installed
--> Processing Dependency: dejavu-fonts-common = 2.33-6.el7 for package: dejavu-sans-fonts-2.33-6.el7.noarch
---> Package libXpm.x86_64 0:3.5.10-5.1.el7 will be installed
---> Package libmcrypt.x86_64 0:2.5.8-9.el6 will be installed
---> Package php-bcmath.x86_64 0:5.4.16-23.el7_0.3 will be installed
---> Package php-mcrypt.x86_64 0:5.3.3-3.el6 will be installed
--> Processing Dependency: php(zend-abi) = 20090626 for package: php-mcrypt-5.3.3-3.el6.x86_64
--> Processing Dependency: php(api) = 20090626 for package: php-mcrypt-5.3.3-3.el6.x86_64
---> Package php-tcpdf.noarch 0:6.2.4-1.el6 will be installed
--> Processing Dependency: php-tidy for package: php-tcpdf-6.2.4-1.el6.noarch
---> Package t1lib.x86_64 0:5.1.2-14.el7 will be installed
--> Running transaction check
---> Package dejavu-fonts-common.noarch 0:2.33-6.el7 will be installed
---> Package php-mcrypt.x86_64 0:5.3.3-3.el6 will be installed
--> Processing Dependency: php(zend-abi) = 20090626 for package: php-mcrypt-5.3.3-3.el6.x86_64
--> Processing Dependency: php(api) = 20090626 for package: php-mcrypt-5.3.3-3.el6.x86_64
---> Package php-tcpdf.noarch 0:6.2.4-1.el6 will be installed
--> Processing Dependency: php-tidy for package: php-tcpdf-6.2.4-1.el6.noarch
--> Finished Dependency Resolution
Error: Package: php-tcpdf-6.2.4-1.el6.noarch (epel)
Requires: php-tidy
Error: Package: php-mcrypt-5.3.3-3.el6.x86_64 (epel)
Requires: php(api) = 20090626
Installed: php-common-5.4.16-23.el7_0.3.x86_64 (@updates)
php(api) = 20100412-64
Available: php-common-5.4.16-21.el7.x86_64 (base)
php(api) = 20100412-64
Available: php-common-5.4.16-23.el7_0.x86_64 (updates)
php(api) = 20100412-64
Available: php-common-5.4.16-23.el7_0.1.x86_64 (updates)
php(api) = 20100412-64
Error: Package: php-mcrypt-5.3.3-3.el6.x86_64 (epel)
Requires: php(zend-abi) = 20090626
Installed: php-common-5.4.16-23.el7_0.3.x86_64 (@updates)
php(zend-abi) = 20100525-64
Available: php-common-5.4.16-21.el7.x86_64 (base)
php(zend-abi) = 20100525-64
Available: php-common-5.4.16-23.el7_0.x86_64 (updates)
php(zend-abi) = 20100525-64
Available: php-common-5.4.16-23.el7_0.1.x86_64 (updates)
php(zend-abi) = 20100525-64
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
答案1
为了解决您的问题,您需要安装优先级:
yum install yum-priorities
接下来编辑你的 /etc/yum.repos.d/remi.repo:
nano /etc/yum.repos.d/remi.repo
并添加priority=5
到 remi 存储库。警告:优先级必须EPEL 存储库上的版本号为 10。
[remi-php56]
name=Remi's PHP 5.6 RPM repository for Enterprise Linux 7 - $basearch
#baseurl=http://rpms.remirepo.net/enterprise/7/php56/$basearch/
mirrorlist=http://rpms.remirepo.net/enterprise/7/php56/mirror
# NOTICE: common dependencies are in "remi-safe"
enabled=1
priority=5
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-remi
然后*通常它可以工作yum update
,yum install php_mcrypt
因为它进入 remy 的存储库来安装 php_mcrypt 包。
答案2
你说你正尝试在 CentOS 7 上安装 phpMyAdmin。但是查看你的命令行输出显示包含如下内容的行:
Package [package details removed for example].el6 will be installed
查看软件包扩展名.el6
;其中的“6”表示正在安装的软件包来自 CentOS 6 EPEL(企业 Linux 的额外软件包)存储库。因此,我建议卸载您已尝试安装的软件包,如下所示:
yum remove phpmyadmin
然后像这样为 CentOS 7 设置正确的 EPEL 存储库;详细信息来自本网站:
rpm -iUvh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
现在更新你的本地包列表:
yum -y update
然后尝试再次安装 phpMyAdmin,如下所示:
yum -y install phpmyadmin
答案3
据我从原始问题和后续评论中了解,您有一个 EL7 服务器,并且添加了来自以下位置的软件包:
- 适用于 EL6 的 EPEL
- 适用于 EL7 的 webtatic
- EL7 的 remi
此时,您不妨重新安装操作系统。恢复是可能的,但您把事情搞得这么糟,表明您没有必要的技能来解决问题(无意冒犯)。重新安装后,决定是否要使用 stock/EPEL(安全组合)、webtatic 或 remi。不要混用,尤其是在主要操作系统版本之间。
答案4
yum --enablerepo=remi,remi-php56 php-mcrypt
yum update