PHPBrewでapcu拡張インストール

1. 環境

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

$ sw_vers
ProductName:	macOS
ProductVersion:	11.3
BuildVersion:	20E232

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

$ phpbrew list
* php-7.4.13
  php-7.3.25

$ php -v
PHP 7.4.13 (cli) (built: Dec  4 2020 21:48:53) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies

2. インストール

$ phpbrew ext install apcu
Downloading https://pecl.php.net/rest/r/apcu/stable.txt via curl extension
[==================================================================] 6.00/6.00B 100%
Downloading https://pecl.php.net/rest/r/apcu/5.1.20.xml via curl extension
[==================================================================] 1.24/1.24KB 100%
Downloading https://pecl.php.net/rest/r/apcu/stable.txt via curl extension
[==================================================================] 6.00/6.00B 100%
Downloading https://pecl.php.net/rest/r/apcu/5.1.20.xml via curl extension
[==================================================================] 1.24/1.24KB 100%
Downloading https://pecl.php.net/get/apcu-5.1.20.tgz via curl extension
[==================================================================] 94.46/94.46KB 100%
===> Extracting to /Users/YOUR_USER_NAME/.phpbrew/build/php-7.4.13/ext...
===> Installing apcu extension...
Log stored at: /Users/YOUR_USER_NAME/.phpbrew/build/php-7.4.13/ext/apcu/build.log
Changing directory to /Users/YOUR_USER_NAME/.phpbrew/build/php-7.4.13/ext/apcu
===> Phpize...
===> Configuring...
===> Building...
===> Running make all: /usr/bin/make -C '/Users/YOUR_USER_NAME/.phpbrew/build/php-7.4.13/ext/apcu' 'all'  >> '/Users/YOUR_USER_NAME/.phpbrew/build/php-7.4.13/ext/apcu/build.log' 2>&1
===> Installing...
===> Running make install: /usr/bin/make -C '/Users/YOUR_USER_NAME/.phpbrew/build/php-7.4.13/ext/apcu' 'install'  >> '/Users/YOUR_USER_NAME/.phpbrew/build/php-7.4.13/ext/apcu/build.log' 2>&1
===> Extension is installed.
===> Creating config file /Users/YOUR_USER_NAME/.phpbrew/php/php-7.4.13/var/db/apcu.ini.disabled
===> Enabling extension apcu
[*] apcu extension is enabled.
Done.
$ phpbrew ext |grep apcu
 [*] apcu         5.1.20

3. iniの場所

$ head ~/.phpbrew/php/php-7.4.13/var/db/apcu.ini
extension=apcu.so