PHPBrewでgmp拡張インストール

1. 環境

インストールする環境はこんな感じ

$ sw_vers
ProductName:	macOS
ProductVersion:	11.4
BuildVersion:	20F71

$ phpbrew --version
phpbrew - 1.27.0
cliframework core: 2.5.4

$ phpbrew list
* php-7.4.21
  php-7.4.13
  php-7.3.25

$ php -v
PHP 7.4.21 (cli) (built: Jul  9 2021 16:54:55) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.21, Copyright (c), by Zend Technologies
    with Xdebug v3.0.4, Copyright (c) 2002-2021, by Derick Rethans

2. インストール

$ phpbrew ext install gmp
===> Installing gmp extension...
Log stored at: /Users/YOUR_USER_NAME/.phpbrew/build/php-7.4.21/ext/gmp/build.log
Changing directory to /Users/YOUR_USER_NAME/.phpbrew/build/php-7.4.21/ext/gmp
===> Phpize...
===> Configuring...
===> Building...
===> Running make all: /usr/bin/make -C '/Users/YOUR_USER_NAME/.phpbrew/build/php-7.4.21/ext/gmp' 'all'  >> '/Users/YOUR_USER_NAME/.phpbrew/build/php-7.4.21/ext/gmp/build.log' 2>&1
===> Installing...
===> Running make install: /usr/bin/make -C '/Users/YOUR_USER_NAME/.phpbrew/build/php-7.4.21/ext/gmp' 'install'  >> '/Users/YOUR_USER_NAME/.phpbrew/build/php-7.4.21/ext/gmp/build.log' 2>&1
===> Extension is installed.
===> Creating config file /Users/YOUR_USER_NAME/.phpbrew/php/php-7.4.21/var/db/gmp.ini.disabled
===> Enabling extension gmp
[*] gmp extension is enabled.
Done.
$ phpbrew ext |grep gmp
 [*] gmp          7.4.21