【问题标题】:can't install mbstring php...missing libgmp.so.3无法安装 mbstring php...缺少 libgmp.so.3
【发布时间】:2016-02-09 21:00:26
【问题描述】:

我只是在 RHEL 上安装了 php 5.4.16,但我也想安装 mbstring。当我尝试通过 yum 安装它时...我在 libgmp.so.3 上遇到依赖错误

[root@ip-108-205-20-169 ec2-user]# yum install php-mbstring
Loaded plugins: amazon-id, rhui-lb, search-disabled-repos
Resolving Dependencies
--> Running transaction check
---> Package php70w-mbstring.x86_64 0:7.0.2-1.w6 will be installed
--> Processing Dependency: php70w-common(x86-64) = 7.0.2-1.w6 for package: php70w-mbstring-7.0.2-1.w6.x86_64
--> Running transaction check
---> Package php70w-common.x86_64 0:7.0.2-1.w6 will be installed
--> Processing Dependency: libgmp.so.3()(64bit) for package: php70w-common-7.0.2-1.w6.x86_64
--> Processing Conflict: php70w-common-7.0.2-1.w6.x86_64 conflicts php-common < 5.5.0
--> Finished Dependency Resolution
Error: Package: php70w-common-7.0.2-1.w6.x86_64 (webtatic)
           Requires: libgmp.so.3()(64bit)
Error: php70w-common conflicts with php-common-5.4.16-36.el7_1.x86_64
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

编辑:

尝试安装 5.4 mbstring,但仍然遇到与 libgmp.so.3 相关的相同错误

[root@ip-108-205-20-169 ec2-user]# yum install php54w-mbstring-5.4.45-2.w6.x86_64
Loaded plugins: amazon-id, rhui-lb, search-disabled-repos
Resolving Dependencies
--> Running transaction check
---> Package php54w-mbstring.x86_64 0:5.4.45-2.w6 will be installed
--> Processing Dependency: php54w-common(x86-64) = 5.4.45-2.w6 for package: php54w-mbstring-5.4.45-2.w6.x86_64
--> Running transaction check
---> Package php54w-common.x86_64 0:5.4.45-2.w6 will be installed
--> Processing Dependency: libgmp.so.3()(64bit) for package: php54w-common-5.4.45-2.w6.x86_64
--> Finished Dependency Resolution
Error: Package: php54w-common-5.4.45-2.w6.x86_64 (webtatic)
           Requires: libgmp.so.3()(64bit)
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

在我的 /usr/lib64 目录中...我有一个 libgmp.so.10....但没有看到 .3

【问题讨论】:

  • 您的 repo 设置不正确,正在尝试将 v7 库填充到 v5.4.16 安装中。

标签: php linux


【解决方案1】:

您正在尝试为 php7 安装 mbstring,但您当前安装的 php 版本是 5.4。您可以删除 php-common-5.4.16-36.el7_1.x86_64 并安装 php70w-common-7.0.2-1.w6.x86_64,或者如果您不想升级到 7,您可以找到 php5.4 的 mbstring。

【讨论】:

    【解决方案2】:

    PHP 5.4.16 是 CentOS 7 提供的默认版本

    您不需要任何额外的存储库(尤其是会引发此类冲突的 webtatic)。

    6 和 7 的混合存储库无法工作。

    修复您的存储库配置,然后为所有扩展点赞

    yum install php-mbstring
    

    【讨论】:

      【解决方案3】:

      在您的情况下,您应该将版本更新到 7:

      rpm -Uvh http://mirror.innosol.asia/remi/enterprise/remi-release-7.rpm
      yum install php71
      yum install php71-php-mysqlnd php71-php-pecl-imagick php71-php-mcrypt php71-php-mbstring  php71-php-pecl-zip php71-php-devel php71-php-gd php71-php-pear 
      

      那么你应该使用yum来列出

      yum list *mbstring*
      

      并使用 yum 安装它。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2014-10-18
        • 2016-04-24
        • 2011-06-14
        • 1970-01-01
        • 2015-04-28
        • 2019-01-09
        • 2015-10-19
        • 2020-11-03
        相关资源
        最近更新 更多