0

I am creating a app and am trying to install a library into my project though composer.

Composer has given me the error:

Problem 1 - The requested PHP extension ext-gmp * is missing from your system. Install or enable PHP's gmp extension.

Ok, it seems like I need to gmp extension.

I am using a Mac, and using a local test server with XAMPP.

Now this is where it starts getting confusing. I went to my XAMPP php.ini and remove the ";" from gmp extension like this: xampp attempt

I retried composer installation with no luck. My next thought was that the extension needs to be installed on the global PHP Mac installation... I removed the ";" for gmp on that php.ini, but no luck. How can I solve this?

2523454
  • 123
  • 4
  • 9

1 Answers1

-2

-if you need it for php 5 use

   brew install homebrew/php/php55-gmp

-if you need it for php 7 use

   brew install homebrew/php/php70-gmp

-and if you don't have homebrew, you can install it using this command

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

OR you can jsut run

   brew install php@7.1

since it have all the packages you need for php 7.1

Shalto
  • 73
  • 1
  • 8