※こちらは旧サイトです(新サイトはこちら)
Debianをjessieからstretchにアップグレードした際に、PHPのビルドが通ってくれなかったのでメモ
phpenv
使用バージョンアップで解決されてる可能性が高いですが、現状確認した物で正常にビルド出来たバージョンは7.2.0RC1
です
[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/
に必要ですよと書いてあるので見に行くと確かに場所が違った
$ 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で試してみた所、シェルスクリプト絡みの何かがアレしてこちらもビルドエラー
[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.
$ 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正式リリース待ちする事に
魂斗羅!
hit ↑↑↓↓←→←→ba[enter] at https://t.co/NWJr7NP0re
— Akihito Koriyama (@koriym) 2017年9月13日