RVM install ruby-3.0.0 failed with gcc-8特有的错误



rvm install ruby-3.0.0 failed with gcc-8 specific error

[2021-03-01 17:27:54] ./configure
current path: /Users/user/.rvm/src/ruby-3.0.0
GEM_HOME=/Users/user/.rvm/gems/ruby-2.6.4
PATH=/usr/local/opt/coreutils/bin:/usr/local/opt/pkg-config/bin:/usr/local/opt/libtool/bin:/usr/local/opt/automake/bin:/usr/local/opt/autoconf/bin:/Users/user/.rvm/gems/ruby-2.6.4/bin:/Users/user/.rvm/gems/ruby-2.6.4@global/bin:/Users/user/.rvm/rubies/ruby-2.6.4/bin:/Users/user/work/software/google-cloud-sdk/bin:/Applications/SnowSQL.app/Contents/MacOS:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/MacGPG2/bin:/Applications/Wireshark.app/Contents/MacOS:/Users/user/.rvm/bin
GEM_PATH=/Users/user/.rvm/gems/ruby-2.6.4:/Users/user/.rvm/gems/ruby-2.6.4@global
command(7): env CFLAGS=-O3 -I/usr/local/opt/libyaml/include -I/usr/local/opt/libksba/include -I/usr/local/opt/readline/include -I/usr/local/opt/zlib/include -I/usr/local/opt/openssl@1.1/include LDFLAGS=-L/usr/local/opt/libyaml/lib -L/usr/local/opt/libksba/lib -L/usr/local/opt/readline/lib -L/usr/local/opt/zlib/lib -L/usr/local/opt/openssl@1.1/lib ./configure --prefix=/Users/user/.rvm/rubies/ruby-3.0.0 --disable-install-doc --enable-shared
checking for ruby... /Users/user/.rvm/rubies/ruby-2.6.4/bin/ruby
tool/config.guess already exists
tool/config.sub already exists
checking build system type... i386-apple-darwin17.7.0
checking host system type... i386-apple-darwin17.7.0
checking target system type... i386-apple-darwin17.7.0
checking for /usr/local/opt/ld/bin/gcc-8... no
checking for /usr/local/opt/gcc-ar/bin/gcc-8... no
checking for /usr/local/opt/g++/bin/gcc-8... no
checking for /usr/local/opt/gcc-nm/bin/gcc-8... no
checking for /usr/local/opt/gcc-ranlib/bin/gcc-8... no
checking for gcc... /usr/local/opt/gcc/bin/gcc-8
checking whether the C compiler works... no
configure: error: in `/Users/user/.rvm/src/ruby-3.0.0':
configure: error: C compiler cannot create executables
See `config.log' for more details

其他观测

/usr/local/opt/gcc@8 exists
/usr/local/opt/gcc/bin/gcc-8 doesn't
gcc@8 8.4.0_1 is already installed and up-to-date

由于这个问题,我正在构建一个项目,任何指针都会有所帮助

这可能是因为gcc路径不同。请与gcc --version核对它会显示路径,请确保从不同的源安装。

相关内容

  • 没有找到相关文章

最新更新