How to install bcmath module?

Solution 1:

Try yum install php-bcmath. If you still can't find anything, try yum search bcmath to find the package name

Solution 2:

ubuntu and php7.1

sudo apt install php7.1-bcmath

ubuntu and php without version specification

sudo apt install php-bcmath

Solution 3:

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

Not sure why I had to go so deep considering the yum install gave me bcmath in phpinfo()