Am running a Centos7 server. This module bcmath
wasn't installed,
I installed it yum install php-bcmath
.
And it doesn't seem to work. It also doesn't appear in info.php page.
The php version I have is 7.1.12 something.
How do I enable it?
For reference purposes, on Ubuntu 16.04.5 LTS, with PHP 7.0, we use:
apt-get install php-bcmath
PHP will be using an additional repository, usually IUS or Remi, so it is likely that you need to install the php71-bcmath
package.
No package php71-bcmath available.
Error: Nothing to do
. remi-php71: remi.schlundtech.de
yum --enablerepo remi.sclundtech.de install php71-bcmath
Failed to set locale, defaulting to C
Loaded plugins: fastestmirror
Error getting repository data for remi.sclundtech.de, repository not found
yum --enablerepo remi-php71
php71-bcmath` but also refer to the document that you followed to find what repo was set up. Sorry for bumping an old post.
The problem was the command yum install php71-bcmath
should be
yum install php7.1-bcmath
The correct command is:
sudo yum install php71-php-bcmath
in case you want to use remi's package https://rpmfind.net/linux/rpm2html/search.php?query=php71-php-bcmath
also after installing it, you probably want to restart apache server if you are running one:
sudo systemctl restart httpd
If you're using centos on linux, and need to 1st find what exact package applies; then the command you're looking for is: yum search bcmath
. This should return you a list of bcmath library applicable.
In my case it was: yum install ea-php72-php-bcmath.x86_64
For Centos 7 with php7.0
Install CentOS SCLo RH repository:
yum install centos-release-scl-rh
Install rh-php71-php-bcmath rpm package:
yum install rh-php71-php-bcmath
Restart Apache
systemctl restart httpd.service
php71-
).yum install php-bcmath
it says it is installed.yum install php71-bcmath
.