RVM:在 Mac OSX El Capitan 上安装最新版本的 ruby​​ 失败

     2023-02-24     75

关键词:

【中文标题】RVM:在 Mac OSX El Capitan 上安装最新版本的 ruby​​ 失败【英文标题】:RVM: failure in installing latest version of ruby on Mac OSX El Capitan 【发布时间】:2015-10-12 00:32:52 【问题描述】:

我是 Ruby 新手,默认情况下我的 Mac 上安装了 2.0.0 版本的 Ruby。我试图获取最新版本,并关注了这个问题:How to update Ruby to 1.9.x on Mac?,但即便如此,最新版本仍然是2.0.0。我复制了一些我使用的终端命令:

Last login: Sun Oct 11 19:58:56 on console
Manish-MBP:~ manishgiri$ ruby -v
ruby 2.0.0p645 (2015-04-13 revision 50299) [universal.x86_64-darwin15]
Manish-MBP:~ manishgiri$ \curl -L https://get.rvm.io | bash -s stable --ruby
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   184  100   184    0     0    102      0  0:00:01  0:00:01 --:--:--   102
100 22721  100 22721    0     0   9052      0  0:00:02  0:00:02 --:--:--  9052
Downloading https://github.com/rvm/rvm/archive/1.26.11.tar.gz
Downloading https://github.com/rvm/rvm/releases/download/1.26.11/1.26.11.tar.gz.asc
Found PGP signature at: 'https://github.com/rvm/rvm/releases/download/1.26.11/1.26.11.tar.gz.asc',
but no GPG software exists to validate it, skipping.

Installing RVM to /Users/manishgiri/.rvm/
    Adding rvm PATH line to /Users/manishgiri/.profile /Users/manishgiri/.mkshrc /Users/manishgiri/.bashrc /Users/manishgiri/.zshrc.
    Adding rvm loading line to /Users/manishgiri/.profile /Users/manishgiri/.bash_profile /Users/manishgiri/.zlogin.
Installation of RVM in /Users/manishgiri/.rvm/ is almost complete:

  * To start using RVM you need to run `source /Users/manishgiri/.rvm/scripts/rvm`
    in all your open shell windows, in rare cases you need to reopen all shell windows.

# Manish-Giri,
#
#   Thank you for using RVM!
#   We sincerely hope that RVM helps to make your life easier and more enjoyable!!!
#
# ~Wayne, Michal & team.

In case of problems: http://rvm.io/help and https://twitter.com/rvm_io
rvm 1.26.11 (latest) by Wayne E. Seguin <wayneeseguin@gmail.com>, Michal Papis <mpapis@gmail.com> [https://rvm.io/]
Searching for binary rubies, this might take some time.
No binary rubies available for: osx/10.11/x86_64/ruby-2.2.1.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for osx.
Installing requirements for osx.
Updating system.......
Error running 'requirements_osx_brew_update_system ruby-2.2.1',
showing last 15 lines of /Users/manishgiri/.rvm/log/1444608144_ruby-2.2.1/update_system.log
    https://github.com/Homebrew/homebrew/wiki/Common-Issues
and make sure `brew update` works before continuing.'
++ /scripts/functions/logging : rvm_error()  115 > rvm_pretty_print stderr
++ /scripts/functions/logging : rvm_pretty_print()  73 > case "$rvm_pretty_print_flag:=auto" in
++ /scripts/functions/logging : rvm_pretty_print()  78 > case "$TERM:-dumb" in
++ /scripts/functions/logging : rvm_pretty_print()  81 > case "$1" in
++ /scripts/functions/logging : rvm_pretty_print()  83 > [[ -t 2 ]]
++ /scripts/functions/logging : rvm_pretty_print()  83 > return 1
++ /scripts/functions/logging : rvm_error()  117 > printf %b 'Failed to update Homebrew, follow instructions here:
    https://github.com/Homebrew/homebrew/wiki/Common-Issues
and make sure `brew update` works before continuing.\n'
Failed to update Homebrew, follow instructions here:
    https://github.com/Homebrew/homebrew/wiki/Common-Issues
and make sure `brew update` works before continuing.
++ /scripts/functions/requirements/osx_brew : requirements_osx_brew_update_system()  381 > return 1
Requirements installation failed with status: 1.
Manish-MBP:~ manishgiri$ brew update
Error: The /usr/local directory is not writable.
Even if this directory was writable when you installed Homebrew, other
software may change permissions on this directory. Some versions of the
"InstantOn" component of Airfoil are known to do this.

You should probably change the ownership and permissions of /usr/local
back to your user account.
  sudo chown -R $(whoami):admin /usr/local
Manish-MBP:~ manishgiri$ sudo chown -R $(whoami):admin /usr/local
Password:
Manish-MBP:~ manishgiri$ ruby -v
ruby 2.0.0p645 (2015-04-13 revision 50299) [universal.x86_64-darwin15]
Manish-MBP:~ manishgiri$ 

看来自制软件有问题,所以我决定更新它。我做了更改所有权和权限部分,并按照这个问题的说明 - How do I update Homebrew? 并执行了brew update。我收到了Already upto date 回复。

接下来,我从第一个答案中尝试了rvm list known,只是为了验证最新版本,然后我执行了rvm install current &amp;&amp; rvm use current。我收到了这样的回复:

Last login: Sun Oct 11 20:01:18 on ttys000
Manish-MBP:~ manishgiri$ rvm list known
# MRI Rubies
[ruby-]1.8.6[-p420]
[ruby-]1.8.7[-head] # security released on head
[ruby-]1.9.1[-p431]
[ruby-]1.9.2[-p330]
[ruby-]1.9.3[-p551]
[ruby-]2.0.0[-p643]
[ruby-]2.1.4
[ruby-]2.1[.5]
[ruby-]2.2[.1]
[ruby-]2.2-head
ruby-head

# for forks use: rvm install ruby-head-<name> --url https://github.com/github/ruby.git --branch 2.1

# JRuby
jruby-1.6.8
jruby[-1.7.19]
jruby-head
jruby-9.0.0.0.pre1

# Rubinius
rbx-1.4.3
rbx-2.4.1
rbx[-2.5.2]
rbx-head

# Opal
opal

# Minimalistic ruby implementation - ISO 30170:2012
mruby[-head]

# Ruby Enterprise Edition
ree-1.8.6
ree[-1.8.7][-2012.02]

# GoRuby
goruby

# Topaz
topaz

# MagLev
maglev[-head]
maglev-1.0.0

# Mac OS X Snow Leopard Or Newer
macruby-0.10
macruby-0.11
macruby[-0.12]
macruby-nightly
macruby-head

# IronRuby
ironruby[-1.1.3]
ironruby-head
Manish-MBP:~ manishgiri$ rvm install current && rvm use current
system
Now using system ruby.

毕竟,我以为它会升级到2.2.3,但是当我运行ruby -v时,我仍然得到:ruby 2.0.0p645 (2015-04-13 revision 50299) [universal.x86_64-darwin15]

为什么更新失败?我在我的 Windows PC 上安装了 RubyInstaller,它使用 2.2.3

【问题讨论】:

那么当您执行 rvm install 2.2.3 时会发生什么? 【参考方案1】:

尝试更新 Homebrew,退出终端,然后重新打开。然后 rvm install ruby​​-1.9.3-p551

还要确保将其设置为默认值。 rvm --default 使用 version #,退出终端,然后重新打开。

我偶然得到它。部分来自此 YouTube 视频:Setting Up Ruby [ Ruby on Rails from the Ground Up - 2/5 ]。剩下的就是用锋利的棍子戳它。

【讨论】:

如何在 mac osx 10.11 El Capitan 上安装 php 7.4 版? [复制]

】如何在macosx10.11ElCapitan上安装php7.4版?[复制]【英文标题】:HowcanIinstallphpversion7.4onmacosx10.11ElCapitan?[duplicate]【发布时间】:2021-03-2101:12:16【问题描述】:我尝试在没有自制软件的情况下在我的macosx上安装php7.4,因为我无法再更... 查看详情

如何在 Mac OSX (El Capitan) 上使用 QtWebKit 构建 Qt5.6

】如何在MacOSX(ElCapitan)上使用QtWebKit构建Qt5.6【英文标题】:HowtobuildQt5.6withQtWebKitonMacOSX(ElCapitan)【发布时间】:2016-03-0316:16:18【问题描述】:我在qt.io网站上找不到如何实际构建qt5.6和qtwebkit的任何具体指针,因此感谢任何提示。... 查看详情

在 OSX 10.11 El Capitan 上安装 therubyracer gem

】在OSX10.11ElCapitan上安装therubyracergem【英文标题】:InstalltherubyracergemonOSX10.11ElCapitan【发布时间】:2016-02-0205:22:04【问题描述】:bundleinstall失败并显示Makesurethat`geminstalltherubyracer-v\'0.12.1\'`succeedsbeforebundlinggeminstalltheru 查看详情

在 Mac OS El Capitan 中安装后自动启动应用程序

】在MacOSElCapitan中安装后自动启动应用程序【英文标题】:AutomaticallystartappafterinstallinMacOSElCapitan【发布时间】:2016-02-1905:49:15【问题描述】:我正在开发一个OSX应用程序,它将在应用程序商店之外分发。我已经存档并创建了pkg文... 查看详情

graphviz 错误:点:无法打开 hello.dot(OSX El Capitan)

】graphviz错误:点:无法打开hello.dot(OSXElCapitan)【英文标题】:graphvizerror:dot:can\'topenhello.dot(OSXElCapitan)【发布时间】:2016-12-2705:09:13【问题描述】:我正在尝试使用Mac(ElCapitan)安装和使用graphviz。按照cmets中graphviz网站上的建议... 查看详情

在 OSX El Capitan 中使用 Homebrew 的 Boost::Log 链接错误

】在OSXElCapitan中使用Homebrew的Boost::Log链接错误【英文标题】:LinkerrorsusingHomebrew\'sBoost::LoginOSXElCapitan【发布时间】:2016-03-2017:50:29【问题描述】:OSX10.11.3(ElCapitan)我在构建Boost::Log教程中的firstexample时遇到链接错误。#include<boost/... 查看详情

在开发过程中替换核心数据模型而不迁移数据(El Capitan 上的 OSX xcode 8.1)

】在开发过程中替换核心数据模型而不迁移数据(ElCapitan上的OSXxcode8.1)【英文标题】:Replacecoredatamodelwhilstindevelopmentwithoutmigratingthedata(OSXxcode8.1onElCapitan)【发布时间】:2016-12-0818:22:24【问题描述】:我对OSX和xCode开发还很陌生,... 查看详情

如何让任何 ionic2 项目在任何 iPhone 模拟器上运行? (来自 osX El Capitan)

...何让任何ionic2项目在任何iPhone模拟器上运行?(来自osXElCapitan)【英文标题】:HowtogetANYionic2projecttorunonANYiPhonesimulator?(fromosXElCapitan)【发布时间】:2017-08-1823:37:05【问题描述】:我尝试在osXElCapitan上运行Ionic2空白模板,部署到iPho... 查看详情

如何在 Python opencv 3.2.0 OSX El Capitan 中手动设置 Facetime 高清摄像头的曝光

】如何在Pythonopencv3.2.0OSXElCapitan中手动设置Facetime高清摄像头的曝光【英文标题】:HowtomanuallysetexposureonaFacetimeHDcamerainPythonopencv3.2.0OSXElCapitan【发布时间】:2017-05-2512:29:15【问题描述】:我想弄清楚如何在我用Python编写的opencv程序... 查看详情

将 OSX 更新为“El Capitan”后未定义的函数 mcrypt

】将OSX更新为“ElCapitan”后未定义的函数mcrypt【英文标题】:UndefinedfunctionmcryptafterupdateOSXto"ElCapitan"【发布时间】:2015-12-3105:03:51【问题描述】:在将“Yosemite”更新为“ElCapitan”后,我遇到了mcrypt扩展问题。致命错误:... 查看详情

“dotnet new”命令在全新安装 OS X 10.11.6 OS X El Capitan 时失败

】“dotnetnew”命令在全新安装OSX10.11.6OSXElCapitan时失败【英文标题】:"dotnetnew"commandfailsonfreshinstallationofOSX10.11.6OSXElCapitan【发布时间】:2016-09-0418:37:18【问题描述】:我已经使用官方下载部分的dotnet-osx-x64.1.0.0.pkg为OSX安装... 查看详情

在 mac el capitan 上的 xampp 上的 xdebug

】在macelcapitan上的xampp上的xdebug【英文标题】:xdebugonxampponmacelcapitan【发布时间】:2018-02-1706:50:35【问题描述】:我在我的mac上用elcapitan安装了XAMPP5.6.31,我可以启动所有的服务,没关系,但现在我必须安装xdebug来调试php。我按... 查看详情

无法在 Mac OS El Capitan 上 ssh localhost

】无法在MacOSElCapitan上sshlocalhost【英文标题】:UnabletosshlocalhostonMacOSElCapitan【发布时间】:2016-09-1912:29:24【问题描述】:我在尝试建立sshlocalhost连接时遇到了一些麻烦。我想在没有密码的情况下执行此操作,因此当我创建公钥/私... 查看详情

gem install pg 在 Mac El Capitan 上不起作用

】geminstallpg在MacElCapitan上不起作用【英文标题】:geminstallpgnotworkingonMacElCapitan【发布时间】:2016-01-2501:20:57【问题描述】:我尝试在MacElCapitan上安装pgGem,但总是收到此错误:Gem::Installer::ExtensionBuildError:错误:无法构建gem原生扩展... 查看详情

在 El Capitan 上安装 MySQL

】在ElCapitan上安装MySQL【英文标题】:InstallingMySQLonElCapitan【发布时间】:2016-03-1111:33:22【问题描述】:我正在尝试在运行OSX10.11的新iMac上全新安装mysql。我下载了最新的10.10dmg并按照安装说明进行操作,但是当我尝试运行mysql时... 查看详情

使用 OSX 10.11 Beta 5 (El Capitan) 设置 IPv6 环境

】使用OSX10.11Beta5(ElCapitan)设置IPv6环境【英文标题】:SettingupIPv6environmentusingOSX10.11Beta5(ElCapitan)【发布时间】:2015-07-3022:52:51【问题描述】:我在2010年中期的MacBookPro上使用ElCapitan设置IPv6环境时遇到了困难。我已按照Apple开发者网... 查看详情

如何在运行 10.11.6 (El Capitan) 的 Mac 上下载 Xcode 9?

】如何在运行10.11.6(ElCapitan)的Mac上下载Xcode9?【英文标题】:HowdoIdownloadXcode9onamacrunning10.11.6(ElCapitan)?【发布时间】:2019-06-0209:37:52【问题描述】:我正在学习关于Flutter编程的课程,它需要Xcode9或更高版本。我的mac当前运行的是1... 查看详情

升级到 OSX El Capitan 后 iOS 模拟器 NSPOSIXErrorDomain Code=2

】升级到OSXElCapitan后iOS模拟器NSPOSIXErrorDomainCode=2【英文标题】:iOSSimulatorNSPOSIXErrorDomainCode=2afterupgradingtoOSXElCapitan【发布时间】:2015-12-3107:24:12【问题描述】:从Yosemite升级到ElCapitan后,我的模拟器无法再连接到我的本地服务器。... 查看详情