如何将phpMyAdmin安装到CentOS

时间:2016-12-13 18:30:31

标签: phpmyadmin centos6 yum

我正在努力在工作中安装和配置phpMyAdmin,我遇到的问题是我的repo没有找到phpMyAdmin的所有依赖项。下面是我的yum.repos.d列表:

yum.repos.d]# ls
epel.repo  redhat.repo      remi-php71.repo  remi-safe.repo  zabbix.repo
notused    remi-php70.repo  remi.repo  temp

我运行yum clean all命令,我得到了这个:

# yum clean all
Cleaning repos: epel remi-safe zabbix zabbix-non-supported
Cleaning up Everything

我也运行yum repolist,这是输出:

# yum repolist
epel/metalink                                             |  13 kB     00:00
epel                                                      | 4.3 kB     00:00
epel/primary_db                                           | 5.9 MB     00:00
remi-safe                                                 | 2.9 kB     00:00
remi-safe/primary_db                                      | 436 kB     00:01
zabbix                                                    |  951 B     00:00
zabbix/primary                                            | 4.0 kB     00:00
zabbix                                                                     22/22
zabbix-non-supported                                      |  951 B     00:00
zabbix-non-supported/primary                              | 3.8 kB     00:00
zabbix-non-supported                                                       15/15
repo id              repo name                                             status
epel                 Extra Packages for Enterprise Linux 6 - x86_64        12,168
remi-safe            Safe Remi's RPM repository for Enterprise Linux 6 - x  1,013
zabbix               Zabbix Official Repository - x86_64                       22
zabbix-non-supported Zabbix Official Repository non-supported - x86_64         15
repolist: 13,218

以下是来自#yum install phpMyAdmin的错误消息,输出如下:

# yum install phpMyAdmin
Setting up Install Process
zabbix                                                    |  951 B     00:00
zabbix-non-supported                                      |  951 B     00:00
Resolving Dependencies
--> Running transaction check
---> Package phpMyAdmin.noarch 0:4.0.10.17-2.el6 will be installed
--> Processing Dependency: php-mcrypt >= 5.2.0 for package: phpMyAdmin-4.0.10.17-2.el6.noarch
--> Processing Dependency: php-mbstring >= 5.2.0 for package: phpMyAdmin-4.0.10.17-2.el6.noarch
--> Processing Dependency: php-tcpdf-dejavu-sans-fonts for package: phpMyAdmin-4.0.10.17-2.el6.noarch
--> Processing Dependency: php-tcpdf for package: phpMyAdmin-4.0.10.17-2.el6.noarch
--> Processing Dependency: php-php-gettext for package: phpMyAdmin-4.0.10.17-2.el6.noarch
--> Running transaction check
---> Package php-mcrypt.x86_64 0:5.3.3-5.el6 will be installed
--> Processing Dependency: libmcrypt.so.4()(64bit) for package: php-mcrypt-5.3.3-5.el6.x86_64
---> Package php-php-gettext.noarch 0:1.0.11-12.el6 will be installed
--> Processing Dependency: php-mbstring for package: php-php-gettext-1.0.11-12.el6.noarch
---> Package php-tcpdf.noarch 0:6.2.11-1.el6 will be installed
--> Processing Dependency: php-tidy for package: php-tcpdf-6.2.11-1.el6.noarch
--> Processing Dependency: php-posix for package: php-tcpdf-6.2.11-1.el6.noarch
--> Processing Dependency: php-mbstring for package: php-tcpdf-6.2.11-1.el6.noarch
--> Processing Dependency: php-bcmath for package: php-tcpdf-6.2.11-1.el6.noarch
---> Package php-tcpdf-dejavu-sans-fonts.noarch 0:6.2.11-1.el6 will be installed
---> Package phpMyAdmin.noarch 0:4.0.10.17-2.el6 will be installed
--> Processing Dependency: php-mbstring >= 5.2.0 for package: phpMyAdmin-4.0.10.17-2.el6.noarch
--> Running transaction check
---> Package libmcrypt.x86_64 0:2.5.8-9.el6 will be installed
---> Package php-php-gettext.noarch 0:1.0.11-12.el6 will be installed
--> Processing Dependency: php-mbstring for package: php-php-gettext-1.0.11-12.el6.noarch
---> Package php-tcpdf.noarch 0:6.2.11-1.el6 will be installed
--> Processing Dependency: php-tidy for package: php-tcpdf-6.2.11-1.el6.noarch
--> Processing Dependency: php-posix for package: php-tcpdf-6.2.11-1.el6.noarch
--> Processing Dependency: php-mbstring for package: php-tcpdf-6.2.11-1.el6.noarch
--> Processing Dependency: php-bcmath for package: php-tcpdf-6.2.11-1.el6.noarch
---> Package phpMyAdmin.noarch 0:4.0.10.17-2.el6 will be installed
--> Processing Dependency: php-mbstring >= 5.2.0 for package: phpMyAdmin-4.0.10.17-2.el6.noarch
--> Finished Dependency Resolution
Error: Package: phpMyAdmin-4.0.10.17-2.el6.noarch (epel)
           Requires: php-mbstring >= 5.2.0
Error: Package: php-tcpdf-6.2.11-1.el6.noarch (epel)
           Requires: php-tidy
Error: Package: php-php-gettext-1.0.11-12.el6.noarch (epel)
           Requires: php-mbstring
Error: Package: php-tcpdf-6.2.11-1.el6.noarch (epel)
           Requires: php-mbstring
Error: Package: php-tcpdf-6.2.11-1.el6.noarch (epel)
           Requires: php-posix
Error: Package: php-tcpdf-6.2.11-1.el6.noarch (epel)
           Requires: php-bcmath
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

您认为哪里可能是问题,我该怎么做才能解决这个问题?

1 个答案:

答案 0 :(得分:1)

您似乎没有基础和更新标准存储库(由centos-release提供)。

您还配置了“remi-safe”存储库,PHP堆栈也可以在“remi-php56”,“remiphp70”或“remi-php71”(未启用的存储库)中使用,但如果没有“这也无法工作” base“repository。

EPEL中的phpMyAdmin 4.0旨在与基础存储库中的PHP 5.3一起使用。

最新的phpMyAdmin(4.6)也位于“remi”存储库中(未启用,如果您想要最新的PHP版本,则更好),但同样需要“基础”。