facebook twitter hatena line email

「Mac/インストール/asdf」の版間の差分

提供: 初心者エンジニアの簡易メモ
移動: 案内検索
(phpプラグイン入れるための準備)
(phpプラグイン入れるための準備)
行14: 行14:
 
$ brew install bison
 
$ brew install bison
 
$ brew install re2c
 
$ brew install re2c
$ brew unlink icu4c
 
$ brew install icu4c@72
 
$ brew install openssl@3
 
 
$ brew install autoconf
 
$ brew install autoconf
 
$ brew install automake
 
$ brew install automake
行24: 行21:
 
$ brew install oniguruma
 
$ brew install oniguruma
  
 +
$ brew unlink icu4c
 +
$ brew install icu4c@72
 
export PKG_CONFIG_PATH="/opt/homebrew/opt/icu4c@72/lib/pkgconfig"
 
export PKG_CONFIG_PATH="/opt/homebrew/opt/icu4c@72/lib/pkgconfig"
 
export LDFLAGS="-L/opt/homebrew/opt/icu4c@72/lib"
 
export LDFLAGS="-L/opt/homebrew/opt/icu4c@72/lib"
 
export CPPFLAGS="-I/opt/homebrew/opt/icu4c@72/include"
 
export CPPFLAGS="-I/opt/homebrew/opt/icu4c@72/include"
 +
 +
$ brew install openssl@3
 +
export LDFLAGS="-L/opt/homebrew/opt/openssl@3/lib"
 +
export CPPFLAGS="-I/opt/homebrew/opt/openssl@3/include"
 +
export PKG_CONFIG_PATH="/opt/homebrew/opt/openssl@3/lib/pkgconfig"
 
</pre>
 
</pre>
  

2026年3月31日 (火) 21:16時点における版

インストール

$ brew install asdf

shell設定

$ echo -e "\n. $(brew --prefix asdf)/libexec/asdf.sh" >> ~/.zshrc
$ source ~/.zshrc

バージョン確認

$ asdf --version
$ asdf version 0.18.1 (revision unknown)

phpプラグイン入れるための準備

$ brew install bison
$ brew install re2c
$ brew install autoconf
$ brew install automake
$ brew install libtool
$ brew install pkg-config
$ brew install libzip
$ brew install oniguruma

$ brew unlink icu4c
$ brew install icu4c@72
export PKG_CONFIG_PATH="/opt/homebrew/opt/icu4c@72/lib/pkgconfig"
export LDFLAGS="-L/opt/homebrew/opt/icu4c@72/lib"
export CPPFLAGS="-I/opt/homebrew/opt/icu4c@72/include"

$ brew install openssl@3
export LDFLAGS="-L/opt/homebrew/opt/openssl@3/lib"
export CPPFLAGS="-I/opt/homebrew/opt/openssl@3/include"
export PKG_CONFIG_PATH="/opt/homebrew/opt/openssl@3/lib/pkgconfig"

phpプラグイン追加

$ asdf plugin add php

php利用可能バージョン

$ asdf list all php
5.6.40
7.4.33
8.5.4

phpインストール例

asdf install php 5.6.40
asdf install php 7.4.33
asdf install php 8.5.4

phpインストール済みリスト

asdf list php

phpデフォルト

asdf global php 8.5.4
php -v

php.ini場所

~/.asdf/installs/php/5.6.40/etc/php.ini
~/.asdf/installs/php/8.5.4/etc/php.ini