Missing BC Math or GMP extension

Moving a Laravel application between two servers, I get this error in the destination server:

RuntimeException
Missing BC Math or GMP extension. (View: /var/www/web/resources/views/templates/main.blade.php)

To solve this, you have to install the GMP extension:

# PHP 7.4
$ sudo apt-get install php7.4-gmp
# PHP 8.0
$ sudo apt-get install php8.0-gmp

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.