以前、 phpenvでPHP7系ビルド時のエラーに関する対処法まとめ という記事を書きましたがそれのPHP8版です
環境
- anyenv, phpenv使用
- php 8.1.29
- Debian 12 bookworm on WSLg
急いでいる人向け
この記事に書いてあるパッケージの一括インストール
1 | sudo apt install -y build-essential \ |
エラー: tar (child): bzip2: exec 不能: そのようなファイルやディレクトリはありません
1 | sudo apt install build-essential |
エラー: configure: error: The pkg-config script could not be found or is too old. Make sure it
1 | sudo apt install pkg-config |
エラー: configure: error: Package requirements (libxml-2.0 >= 2.9.0) were not met:
1 | sudo apt install libxml2-dev |
エラー: configure: error: Package requirements (openssl >= 1.0.2) were not met:
1 | sudo apt install libssl-dev |
エラー: configure: error: Package requirements (sqlite3 >= 3.7.7) were not met:
1 | sudo apt install libsqlite3-dev |
エラー: configure: error: Package requirements (zlib >= 1.2.0.4) were not met:
1 | sudo apt install zlib1g-dev |
エラー: configure: error: Package requirements (libcurl >= 7.29.0) were not met:
1 | sudo apt install libcurl4-openssl-dev |
エラー: configure: error: Package requirements (libpng) were not met:
1 | sudo apt install libpng-dev |
エラー: configure: error: Package requirements (libjpeg) were not met:
1 | sudo apt install libjpeg-dev |
エラー: configure: error: Package requirements (oniguruma) were not met:
1 | sudo apt install libonig-dev |
エラー: configure: error: Please reinstall readline - I cannot find readline.h
1 | sudo apt install libreadline-dev |
エラー: configure: error: Cannot find libtidy
1 | sudo apt install libtidy-dev |
エラー: configure: error: Package requirements (libxslt >= 1.1.0) were not met:
1 | sudo apt install libxslt-dev |
エラー: Package 'libzip', required by 'virtual:world', not found
1 | sudo apt install libzip-dev |
エラー: PEAR package PHP_Archive not installed: generated phar will require PHP's phar extension be enabled.
1 | sudo apt install autoconf |