phpenvだけ入った状態でphp7をインストールしようとすると
-----------------
| BUILD ERROR |
-----------------
Here are the last 10 lines from the log:
-----------------------------------------
2 warnings generated.
/var/tmp/php-build/source/7.0.3/ext/zip/lib/mkstemp.c:75:8: warning: implicit declaration of function 'getpid' is invalid in C99 [-Wimplicit-function-declaration]
pid = getpid();
^
1 warning generated.
/var/tmp/php-build/source/7.0.3/Zend/zend.c:1292:1: warning: function declared 'noreturn' should not return [-Winvalid-noreturn]
}
^
1 warning generated.
PEAR package PHP_Archive not installed: generated phar will require PHP's phar extension be enabled.
-----------------------------------------
というようなエラーが表示されます。
php7インストールに必要なパッケージがないためなので、すべてインストールします。
$ brew install bison
$ brew install re2c
$ brew install libjpeg
$ brew install libpng
$ brew install libmcrypt
$ brew install autoconf
その後インストールします。
$ phpenv install 7.0.3
[Success]: Built 7.0.3 successfully.
すんなり入りました。