How to install GMP with php 7.1 / CentOS 7

vverloop

Verified User
Joined
Mar 30, 2010
Messages
35
After countless hours trying to install GMP extension for PHP it fails.

Can somebody tell me how to do this?

Code:
yum install gmp

And then...

It tells me its already installed the same is for gmp-devel

Also when i rebuild PHP with the option in the custom/ap2/configure.php71 --with-gmp
it fails and tells me that the
Code:
/usr/local/lib/libgmp.so
is not a valid php library (
Code:
PHP Startup: Invalid library (maybe not a PHP library) 'libgmp.so'
)
 
Hello,

I guess you might need to install gmp-devel as well. And then only try to rebuild PHP. And no libgmp.so is used here, as PHP will be built with internal support of gmp.
 
Thanks for you reply.

You are right, it is working now.
My problem was also, that i was using the wrong configure file. I used Apache config file instead of PHP-FPM config file.
 
Back
Top