如何安装bcmath模块?

时间:2010-08-03 20:05:55

标签: php module bcmath

如何在服务器上安装bcmath模块?我试过了

yum update php-bcmath

但它说什么都没找到。

19 个答案:

答案 0 :(得分:46)

试试yum install php-bcmath。 如果您仍找不到任何内容,请尝试yum search bcmath查找包名称

答案 1 :(得分:34)

ubuntu和php7.1

sudo apt install php7.1-bcmath

答案 2 :(得分:8)

在CentOS 6.5上工作得很好

yum install bcmath

所有对bcmath函数的调用在apache重启后立即开始工作

service httpd restart

甜!

答案 3 :(得分:6)

yum install php72-php-bcmath.x86_64
cp /etc/opt/remi/php72/php.d/20-bcmath.ini /etc/php.d/
cp /opt/remi/php72/root/usr/lib64/php/modules/bcmath.so /usr/lib64/php/modules/
systemctl restart httpd

不知道为什么我不得不深入考虑yum安装使我在phpinfo()中获得了bcmath

答案 4 :(得分:3)

使用Docker的官方PHP映像时,请使用docker-php-ext-install bcmath

来源:https://hub.docker.com/_/php?tab=description#php-core-extensions

答案 5 :(得分:3)

如果您已安装php 7.1 然后这条线就可以在您的系统上工作了。

sudo apt install php7.1-bcmath

ubuntu 16.04上检查系统中的php版本

php -v

然后结果显示在那里。

  

PHP 7.1.x + ubuntu16.04.1 + deb.sury.org + 1(CLI)(建于:2018年8月19日   07:16:12)(NTS)版权所有(c)1997-2018 The PHP Group Zend Engine   v3.2.0,版权所有(c)1998-2018 Zend Technologies       与Zend OPcache v7.2.9-1 + ubuntu16.04.1 + deb.sury.org + 1,Zend Technologies版权所有(c)1999-2018

答案 6 :(得分:2)

bcmathArch Linux中启用Manjaro

编辑php.ini

nano /etc/php/php.ini

取消注释 bcmath(去掉分号)

extension=bcmath

如果您使用的是 Apache 服务器,请通过以下方式重新加载服务器

sudo systemctl reload apache.server

sudo systemctl realod httpd

如果你不使用Apache

sudo systemctl reload php-fpm.service

查看激活的模块

php -m

要确保已安装并激活 bcmath,请搜索它

php -m | grep bcmath

答案 7 :(得分:2)

如果要启用任何扩展,则必须先安装扩展,可以启用扩展但未安装扩展,例如bcmath

1.yum搜索php-bcmath

2。然后确保要在其中安装此扩展程序的php版本

3.u将获得类似yum search命令的输出>>

yum搜索php-bcmath ** 加载的插件:最快的镜像,通用挂钩 从缓存的主机文件加载镜像速度

EA4: 66.71.244.18
cpanel-addons-production-feed: 66.71.244.18
base: mirror.nodesdirect.com
epel: mirror.coastal.edu
extras: www.gtlib.gatech.edu
nux-dextop: mirror.li.nux.ro
updates: mirror.jaleco.com
**============================================================== N/S matched: php-bcmath ===============================================================
ea-php54-php-bcmath.x86_64 : A module for PHP applications for using the bcmath library
ea-php55-php-bcmath.x86_64 : A module for PHP applications for using the bcmath library
ea-php56-php-bcmath.x86_64 : A module for PHP applications for using the bcmath library
ea-php70-php-bcmath.x86_64 : A module for PHP applications for using the bcmath library
ea-php71-php-bcmath.x86_64 : A module for PHP applications for using the bcmath library
ea-php72-php-bcmath.x86_64 : A module for PHP applications for using the bcmath library
then use >yum install ea-php72-php-bcmath.x86_64
5.this bcmath extension for php7.2
6.I wanna install for php71 then the command will be like **yum install ea-php71-php-bcmath.x86_64**  or yum install php71-bcmath.

7.u可以安装上述步骤中的任何扩展程序。

答案 8 :(得分:2)

我发现没有启用包裹的仓库。在OEL7上,

Firebase Dynamic Links

这有用......

我使用以下命令查找包的位置

Firebase-generated Dynamic Link Domain

答案 9 :(得分:2)

正在调用未定义的函数bcmod()

yum install php-bcmath
systemctl restart httpd.service

然后您应该会看到类似于phpinfo下列出的/etc/php.d/bcmath.ini的内容。

Centos 7
Plesk 12
PHP 5.4.16

答案 10 :(得分:0)

我刚试过下面的php v5.6包,它对我有用。

yum install php56w-bcmath

答案 11 :(得分:0)

apt repo具有此扩展名,只需从终端运行以下命令即可:

sudo apt-get install php7.2-bcmath *

答案 12 :(得分:0)

如果仍然没有人知道如何安装bcmath,因为它还有很多其他依赖模块要安装,例如php7.2-common等。

尝试使用突触应用程序进行安装。射击命令。\

sudo apt-get install synaptic

打开突触应用程序,然后单击搜索选项卡。

搜索bcmath

搜索结果将显示所有软件包均取决于php。

根据您的方便安装。

并安装所需的所有自动填充相关性。

就是这样。

答案 13 :(得分:0)

这对我有用install php72-php-bcmath.x86_64 然后,

systemctl restart php72-php-fpm.service

答案 14 :(得分:0)

对于使用php7.0的Centos 7

安装CentOS SCLo RH存储库:yum install centos-release-scl-rh

安装rh-php71-php-bcmath rpm软件包:yum install rh-php71-php-bcmath

systemctl restart httpd.service

答案 15 :(得分:0)

如果要在ubuntu中安装PHP扩展。

首先知道哪个PHP版本是活动的。

php -v

使用该命令安装所需的插件之后。

sudo apt install php7.0-bcmath

您可以将php7.0-bcmath替换为php-PHPVersion-extensionName

答案 16 :(得分:0)

对于PHP 7+版本,您只能使用:

sudo apt install php-bcmath

答案 17 :(得分:0)

在Ubuntu PHP 7.3中

sudo apt install php7.3-bcmath

答案 18 :(得分:0)

以下内容通过remi存储库在带有PHP 7.1的Centos 7.4上为我工作。

首先找出我拥有哪个PHP版本:

[kiat@reporting ~]$ php --version
PHP 7.1.33 (cli) (built: Oct 23 2019 07:28:45) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.1.0, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.1.33, Copyright (c) 1999-2018, by Zend Technologies

然后在bcmath存储库中搜索remi-php71扩展名:

[kiat@reporting ~]$ yum search php71 | grep bcmath
php71-php-bcmath.x86_64 : A module for PHP applications for using the bcmath
php71u-bcmath.x86_64 : A module for PHP applications for using the bcmath

现在安装第一个匹配的扩展名:

[kiat@reporting ~]$ sudo yum --enablerepo=remi-php71 install php-bcmath
Loaded plugins: fastestmirror, langpacks
base                                                     | 3.6 kB     00:00
.
.
.

最后,重新启动php和nginx:

[kiat@reporting ~]$ sudo systemctl restart php-fpm nginx