2024-10-01
執行:
asdf install ruby 3.2.5
出現錯誤:
ruby-build: using readline from homebrew
ruby-build: using libyaml from homebrew
ruby-build: using gmp from homebrew
-> ./configure "--prefix=$HOME/.asdf/installs/ruby/3.2.5" --enable-shared --with-readline-dir=/opt/homebrew/opt/readline --with-libyaml-dir=/opt/homebrew/opt/libyaml --with-gmp-dir=/opt/homebrew/opt/gmp --with-ext=openssl,psych,+ --with-openssl-dir=/opt/homebrew/opt/openssl@3
BUILD FAILED (macOS 14.6.1 on arm64 using ruby-build 20240917)
You can inspect the build directory at /var/folders/1w/sr6d_nvn7dd_drfwkxdwtq140000gn/T/ruby-build.20241001083850.3880.8ikCxA
See the full build log at /var/folders/1w/sr6d_nvn7dd_drfwkxdwtq140000gn/T/ruby-build.20241001083850.3880.log
查看 log:
checking whether the C compiler works... no
configure: error: in `/var/folders/1w/sr6d_nvn7dd_drfwkxdwtq140000gn/T/ruby-build.20241001083850.3880.8ikCxA/ruby-3.2.5':
configure: error: C compiler cannot create executables
See `config.log' for more details
external command failed with status 77
執行:
sudo xcodebuild -license accept
再執行:
asdf install ruby 3.2.5
成功。