Debianをjessieからstretchにアップグレードした際に、PHPのビルドが通ってくれなかったのでメモ
環境
phpenv使用
Debian 9 stretch
先に結論 バージョンアップで解決されてる可能性が高いですが、現状確認した物で正常にビルド出来たバージョンは7.2.0RC1です
curlのPATHが違うと怒られる 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 [Downloading]: https://secure.php.net/distributions/php-7.0.14.tar.bz2 [Preparing]: /tmp/php-build/source/7.0.14 ----------------- | BUILD ERROR | ----------------- Here are the last 10 lines from the log: ----------------------------------------- shtool:echo:Warning: unable to determine terminal sequence for bold mode shtool:echo:Warning: unable to determine terminal sequence for bold mode configure: error: Please reinstall the libcurl distribution - easy.h should be in <curl-dir>/include/curl/ ----------------------------------------- The full Log is available at '/tmp/php-build.7.0.14.20170913004607.log'. [Warn]: Aborting build.
eash.hが<curl-dir>/include/curl/に必要ですよと書いてあるので見に行くと確かに場所が違った
1 2 3 4 5 6 7 8 $ docker exec 9zilla-nginx-php find / -name easy.h /usr/include/x86_64-linux-gnu/curl/easy.h $ docker exec 9zilla-nginx-php ls -l /usr/include/curl/ ls: '/usr/include/curl/' にアクセスできません: そのようなファイルやディレクトリはありません $ docker exec 9zilla-nginx-php ls -l /usr/include/x86_64-linux-gnu/curl/easy.h -rw-r--r-- 1 root root 3473 4月 19 19:19 /usr/include/x86_64-linux-gnu/curl/easy.h
調べた
↑によると、
Looks like the proper place to fix it is PHP itself: https://bugs.php.net/bug.php?id=74125 .
という事なので、PHPバージョンをあげて再ビルドしてみる
7.1.9はシェルスクリプトまわりでエラー 7.1.9 で試してみた所、シェルスクリプト絡みの何かがアレしてこちらもビルドエラー
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 [Info]: Building 7.1.9 into /home/9zilla/.anyenv/envs/phpenv/versions/7.1.9 [Downloading]: https://secure.php.net/distributions/php-7.1.9.tar.bz2 [Preparing]: /tmp/php-build/source/7.1.9 ----------------- | BUILD ERROR | ----------------- Here are the last 10 lines from the log: ----------------------------------------- shtool:echo:Warning: unable to determine terminal sequence for bold mode shtool:echo:Warning: unable to determine terminal sequence for bold mode ./configure: line 410: test: please: integer expression expected configure: error: reinstall ./configure: line 299: return: please: numeric argument required ./configure: line 309: exit: please: numeric argument required ----------------------------------------- The full Log is available at '/tmp/php-build.7.1.9.20170913140117.log'. [Warn]: Aborting build.
インストール候補がRC1しか無かった 1 2 3 4 5 6 7 8 9 10 11 $ phpenv install -l | tail -n 10 7.1.5 7.1.6 7.1.7 7.1.8 7.1.9 7.1snapshot 7.2.0beta3 7.2.0RC1 7.2snapshot master
7.1.9より上位バージョンは、現時点(2017/09)では7.2.0RC1 止まりのようなので、暫定でこちら使用したらビルド出来ました
ということで、7.2.0正式リリース待ちする事に
おまけ 魂斗羅!