I recently moved from Kubuntu to Manjaro. On Manjaro (an Arch-based distro), there doesn't seem to be a package for GMP (GNU Multiple Precision) support for PHP. I only need it to work on the command line (PHP shell via php -a). How can I install it?


Turns out there is no package to add GMP support to PHP under Manjaro because it's not really needed. I had to install the GMP library via

sudo pacman -S gmp

and then enable GMP support in PHP's settings. For the latter, I searched for all PHP ini files on my computer:

find / -name "*php*.ini" 2> /dev/null

This only printed:


In this file, there is this line:


After removing the semicolon, it worked.

  • 1
    Instead, use the command: php --ini Example of output : Configuration File (php.ini) Path: /etc/php Loaded Configuration File: /etc/php/php.ini Scan for additional .ini files in: /etc/php/conf.d Additional .ini files parsed: (none) – Lyda Lauras Dec 9 '19 at 13:24
  • @LydaLauras Cool, thank you. That's nice to know. – UTF-8 Dec 9 '19 at 15:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.