无法安装mbstring php ...缺少libgmp.so.3

时间:2016-02-09 21:00:27

标签: php linux

我只是在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

3 个答案:

答案 0 :(得分:0)

您正在尝试为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。

答案 1 :(得分:0)

对于您而言,您应该将发行版更新为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进行安装。

答案 2 :(得分:0)

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

您不需要任何其他存储库(尤其是Webtatic会引起此类冲突)。

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

修复您的存储库配置,然后像对所有扩展一样

return new Scaffold(
      backgroundColor: whiteColor,
      body: new Column(
        children: <Widget>[
          imgHeader,
          lblSignUp,
          txtEmail,
          Row(
            mainAxisAlignment: MainAxisAlignment.start,
            children: <Widget>[
              txtFirstName,
              txtLastName
            ],
          ),
        ],
      ),
    );