【问题标题】:yum install php-bcmath Requires: php-common(x86-64) = 5.3.3-22.el6yum install php-bcmath 要求:php-common(x86-64) = 5.3.3-22.el6
【发布时间】:2013-03-14 14:35:00
【问题描述】:

我正在运行 centos 6,我尝试过:

yum install php-bcmath,我收到了这个错误:

yum install php-bcmath
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.checkdomain.de
 * epel: mirror.de.leaseweb.net
 * extras: mirror.checkdomain.de
 * rpmforge: mirror.de.leaseweb.net
 * updates: mirror.checkdomain.de
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package php-bcmath.x86_64 0:5.3.3-22.el6 will be installed
--> Processing Dependency: php-common(x86-64) = 5.3.3-22.el6 for package: php-bcmath-5.3.3-22.el6.x86_64
--> Finished Dependency Resolution
Error: Package: php-bcmath-5.3.3-22.el6.x86_64 (base)
           Requires: php-common(x86-64) = 5.3.3-22.el6
           Installed: php-common-5.4.9-1.el6.remi.x86_64 (@remi-test)
              php-common(x86-64) = 5.4.9-1.el6.remi
           Available: php-common-5.3.3-22.el6.x86_64 (base)
              php-common(x86-64) = 5.3.3-22.el6
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

请帮忙,

谢谢

【问题讨论】:

    标签: centos centos6


    【解决方案1】:

    你可以试试(Centos 6.4)

    rpm -Uvh http://mirror.webtatic.com/yum/el6/latest.rpm
    yum install php54w
    yum install yum-plugin-replace
    yum replace php-common --replace-with=php54w-common
    yum install php54w-bcmath
    

    (来源:http://www.webtatic.com/packages/php54/

    但这可能会导致另一个版本问题。

    简单的方法是卸载php 5.4(或5.5), 安装 php 5.3,安装 php-bcmatch 然后更新到 php5.4(或更高版本)

    【讨论】:

      【解决方案2】:

      这听起来可能很愚蠢,但它让我失去了几个小时(是的,我知道..)但不要忘记:

      sudo service httpd graceful
      

      之后:

      yum install php-bcmath
      

      【讨论】:

        【解决方案3】:

        我的服务器运行的是 PHP 5.6,下面的命令解决了我的问题

        sudo yum -y install php56-bcmath
        
        sudo service httpd restart
        

        【讨论】:

        • 重启 apache 很关键
        【解决方案4】:

        我发现问题来自新的 PHP 版本(5.4、5.4),它安装在一个单独的仓库中。
        因此,我们只需要在主仓库(5.3 版)中安装 php-bcmath,使用命令:

        yum install php-bcmath --enablerepo=remi
        

        “remi”是主仓库,您可以通过转到 /etc/yum.repos.d 然后使用 ll

        来查看它

        【讨论】:

        • 谢谢,它解决了我的问题,让我免于头痛。
        猜你喜欢
        • 2011-06-11
        • 1970-01-01
        • 2015-03-08
        • 2016-09-13
        • 2015-03-14
        • 2014-11-10
        • 2018-10-05
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多