Centos yum安装php-bcmath需要:php-common(x86-64)=5.3.3-22.el6

Centos yum安装php-bcmath需要:php-common(x86-64)=5.3.3-22.el6,centos,centos6,Centos,Centos6,我正在运行centos 6,我试图: yum安装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: m

我正在运行centos 6,我试图:

yum安装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 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
资料来源:

但这可能会导致有关版本的另一个问题

简单的方法是卸载PHP5.4或5.5,
安装php5.3,安装PHPBCMATCH,然后更新到php5.4或更高版本

我发现问题来自新的php5.4、5.4版本,它安装在一个单独的repo中。 因此,我们只需要使用以下命令在主repo版本5.3中安装php bcmath:


由于remi是主要的回购协议,您可以通过访问/etc/yum.repos.d查看它,然后使用ll

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

sudo service httpd graceful
之后:

yum install php-bcmath

我的服务器运行PHP5.6,下面的命令解决了我的问题

sudo yum -y install php56-bcmath

sudo service httpd restart

谢谢,它解决了我的问题,避免了头痛。重新启动apache是至关重要的
sudo yum -y install php56-bcmath

sudo service httpd restart