Closed1
phpbrew で新しいバージョンをインストールする時

phpbrew install 8.3.7
これを実行したところ、
error: bz2 module requires libbz2 >= 1.0.0
こういうエラーが出た
brew install bzip2
とりあえずインストール!
環境変数も設定した👇(Apple Silicon (M3) Mac を利用してる)
export LDFLAGS="-L/opt/homebrew/opt/bzip2/lib"
export CPPFLAGS="-I/opt/homebrew/opt/bzip2/include"
phpbrew install 8.3.7 +bz2 +default
やはりエラーになる
configure: error: Package requirements (libcurl >= 7.29.0) were not met:
Package 'ldap', required by 'libcurl', not found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables CURL_CFLAGS
and CURL_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
Package 'ldap', required by 'libcurl', not found
とのことなのでインストールした
→ brew install openldap
export PKG_CONFIG_PATH="/opt/homebrew/opt/openldap/lib/pkgconfig:$PKG_CONFIG_PATH"
export CPPFLAGS="-I/opt/homebrew/opt/openldap/include $CPPFLAGS"
export LDFLAGS="-L/opt/homebrew/opt/openldap/lib $LDFLAGS"
環境変数も設定したが、特にエラー内容が変わらない...
export PKG_CONFIG_PATH="/opt/homebrew/lib/pkgconfig:/opt/homebrew/opt/openldap/lib/pkgconfig:$PKG_CONFIG_PATH"
export CPPFLAGS="-I/opt/homebrew/include -I/opt/homebrew/opt/openldap/include $CPPFLAGS"
export LDFLAGS="-L/opt/homebrew/lib -L/opt/homebrew/opt/openldap/lib $LDFLAGS"
環境変数の定義を修正した
phpbrew の実行コマンドも変更
phpbrew install 8.3.7 +curl +ldap +bz2 +default
ここまでやって無事インストール完了!!
このスクラップは2ヶ月前にクローズされました