OSX 10.14+安装ruby报错

先贴问题

MacPro:~ a123$ rvm install 2.6.0
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.14/x86_64/ruby-2.6.0.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Found gcc installed by brew but it will most likely not work on OSX 10.14+, please uninstall before continuing

brew rm gcc*

Error: No such keg: /usr/local/Cellar/gcc@7
Requirements installation failed with status: 1.

问题说gcc@7不存在
更新下gcc@7就能解决问题了

MacPro:~ a123$  brew install gcc@7
Updating Homebrew...
==> Downloading https://homebrew.bintray.com/bottles/[email protected]
Already downloaded: /Users/a123/Library/Caches/Homebrew/downloads/d4552597f614fc16c0a55b77f775830c528596a0a33697fa028661c49b0f1e03--gcc@7-7.4.0.mojave.bottle.tar.gz
==> Pouring [email protected]
  /usr/local/Cellar/gcc@7/7.4.0: 1,399 files, 256.2MB
MacPro:~ a123$ gcc -v
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/c++/4.2.1
Apple LLVM version 10.0.0 (clang-1000.10.44.4)
Target: x86_64-apple-darwin18.0.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
hehuijinfu:~ a123$ rvm install 2.6
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.14/x86_64/ruby-2.6.0-rc2.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Found gcc installed by brew but it will most likely not work on OSX 10.14+, please uninstall before continuing

brew rm gcc*

Uninstalling /usr/local/Cellar/gcc@7/7.4.0... (1,399 files, 256.2MB)
Missing required packages: [email protected]
Somehow it happened there is no executable 'openssl',
run 'brew doctor' and make sure latest '[email protected]' is installed properly.
Requirements installation successful.
Installing Ruby from source to: /Users/a123/.rvm/rubies/ruby-2.6.0-rc2, this may take a while depending on your cpu(s)...
ruby-2.6.0-rc2 - #downloading ruby-2.6.0-rc2, this may take a while depending on your connection...
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 13.9M  100 13.9M    0     0  44760      0  0:05:25  0:05:25 --:--:-- 64577
ruby-2.6.0-rc2 - #extracting ruby-2.6.0-rc2 to /Users/a123/.rvm/src/ruby-2.6.0-rc2.....
ruby-2.6.0-rc2 - #configuring..................................................|
ruby-2.6.0-rc2 - #post-configuration.
ruby-2.6.0-rc2 - #compiling....................................................|
ruby-2.6.0-rc2 - #installing...........
ruby-2.6.0-rc2 - #making binaries executable..
Installed rubygems 3.0.0.beta3 is newer than 2.7.8 provided with installed ruby, skipping installation, use --force to force installation.
ruby-2.6.0-rc2 - #gemset created /Users/a123/.rvm/gems/ruby-2.6.0-rc2@global
ruby-2.6.0-rc2 - #importing gemset /Users/a123/.rvm/gemsets/global.gems.......there was an error installing gem rubygems-bundler
...............................
ruby-2.6.0-rc2 - #generating global wrappers.......
ruby-2.6.0-rc2 - #gemset created /Users/a123/.rvm/gems/ruby-2.6.0-rc2
ruby-2.6.0-rc2 - #importing gemsetfile /Users/a123/.rvm/gemsets/default.gems evaluated to empty gem list
ruby-2.6.0-rc2 - #generating default wrappers.......
ruby-2.6.0-rc2 - #adjusting #shebangs for (gem irb erb ri rdoc testrb rake).
Install of ruby-2.6.0-rc2 - #complete 
Ruby was built without documentation, to build it run: rvm docs generate-ri
MacPro:~ a123$ ruby -v
ruby 2.6.0rc2 (2018-12-15 trunk 66408) [x86_64-darwin18]

你可能感兴趣的:(OSX 10.14+安装ruby报错)