【问题标题】:Error Installing phpmyadmin on CentOS在 CentOS 上安装 phpmyadmin 时出错
【发布时间】:2024-05-23 01:35:02
【问题描述】:

当我尝试使用这个在 CentOS 6.5 VPS 上安装 phpmyadmin 时出现这个错误。

命令:

sudo yum install phpmyadmin

错误:

Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.solarvps.com
 * epel: epel.mirror.constant.com
 * extras: mirror.wiredtree.com
 * rpmforge: repoforge.mirror.constant.com
 * updates: mirrors.lga7.us.voxel.net
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package phpmyadmin.noarch 0:2.11.11.3-2.el6.rf will be installed
--> Processing Dependency: php-mbstring >= 4.1.0 for package: phpmyadmin-2.11.11.3-2.el6.rf.noarch
--> Running transaction check
---> Package php-mbstring.x86_64 0:5.3.3-27.el6_5 will be installed
--> Processing Dependency: php-common(x86-64) = 5.3.3-27.el6_5 for package: php-mbstring-5.3.3-27.el6_5.x86_64
--> Finished Dependency Resolution
Error: Package: php-mbstring-5.3.3-27.el6_5.x86_64 (updates)
           Requires: php-common(x86-64) = 5.3.3-27.el6_5
           Installed: php-common-5.4.30-1.el6.remi.x86_64 (@remi)
               php-common(x86-64) = 5.4.30-1.el6.remi
           Available: php-common-5.3.3-26.el6.x86_64 (base)
               php-common(x86-64) = 5.3.3-26.el6
           Available: php-common-5.3.3-27.el6_5.x86_64 (updates)
               php-common(x86-64) = 5.3.3-27.el6_5
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

请有人帮忙。提前感谢

【问题讨论】:

    标签: linux phpmyadmin centos


    【解决方案1】:

    您从另一个来源 (@remi) 安装了比官方(基本)存储库提供的更新的 PHP 版本 (5.4.30-1)。现在您正在尝试安装依赖于 php-mbstring 的 phpMyAdmin 包。 php-mbstring 是这里的实际问题——它是自动安装的,因为 phpmyadmin 依赖于它,但是您尝试安装的版本与 PHP 安装的其余部分不兼容。

    不过,解决方案很简单,因为 remi 还提供了 phpmyadmin(比您尝试安装的版本更新得多!)。只需像安装 PHP 一样从 remi 存储库安装 phpmyadmin 和 php-common。如果您忘记了,http://blog.famillecollet.com/pages/Config-en 有一些说明,但是您已经设法安装了升级后的 PHP,因此您应该能够很容易地安装 remi phpmyadmin。

    或者....

    http://www.phpmyadmin.netuncompress it 下载 phpMyAdmin 到您的 Web 根目录,然后忘记包。 php-mbstring 并不是运行应用程序的严格要求,所以你甚至不需要担心这部分,只要你meet the other requirements

    【讨论】:

      【解决方案2】:

      您从 remi 存储库安装了 php5.4。

      phpmyadmin 需要 php 才能工作;但是您正在从官方存储库安装 phpmyadmin,并且该 phpmyadmin 版本需要 php5.3。

      我猜你不想回到 php5.3,所以只要运行这个命令:

      yum --enablerepo=remi install phpmyadmin
      

      如果您没有将 remi 存储库添加到 CentOS,则必须之前运行:

      sudo rpm -Uvh http://download.fedoraproject.org/pub/epel/6/i386/epel-release-6-8.noarch.rpm
      sudo rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
      

      【讨论】:

      • 这个解决方案对我来说完美无缺。谢谢米克尔!