yum install php-bcmath Requires: php-common(x86-64) = 5.3.3-22.el6

落爺英雄遲暮 提交于 2019-12-12 03:54:09

问题


Im running centos 6, and I tried to:

yum install php-bcmath, i got this error:

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

Please help,

Thanks


回答1:


I found out problem comes from the new PHP version (5.4, 5.4), which installed in a separate repo.
So, we just need to install php-bcmath in the main repo (version 5.3) using command:

yum install php-bcmath --enablerepo=remi

With "remi" is the main repo, you can see it by go to /etc/yum.repos.d then using ll




回答2:


My Server was running PHP 5.6 and the below command solved my issue

sudo yum -y install php56-bcmath

sudo service httpd restart



回答3:


It may sound stupid, but it made me lost few hours (yeah, i know..) but do not forget:

sudo service httpd graceful

after:

yum install php-bcmath



回答4:


You can try (for 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

(source: http://www.webtatic.com/packages/php54/)

But it may cause another problem about versions.

The simple way is uninstall php 5.4 (or 5.5), install php 5.3, install php-bcmatch then update to php5.4 (or newer)



来源:https://stackoverflow.com/questions/15609273/yum-install-php-bcmath-requires-php-commonx86-64-5-3-3-22-el6

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!