Macos 安装rvm:遇到权限问题

Macos 安装rvm:遇到权限问题,macos,terminal,rvm,Macos,Terminal,Rvm,我在尝试在OS X上安装rvm时收到此错误消息: fatal: Unable to create '/usr/local/.git/index.lock': Permission denied Error: Failure while executing: git checkout -q master Failed to update Homebrew, follow instructions here: https://github.com/mxcl/homebrew/wiki/Com

我在尝试在OS X上安装rvm时收到此错误消息:

fatal: Unable to create '/usr/local/.git/index.lock': Permission denied
Error: Failure while executing: git checkout -q master
Failed to update Homebrew, follow instructions here:
    https://github.com/mxcl/homebrew/wiki/Common-Issues
and make sure `brew update` works before continuing.
这是我的原始命令(按照rvm网站上的说明)

我去了“常见问题”页面,那里没有提到这个错误- 为了给你一些背景资料——我安装了应用程序Gitbox,这是唯一一个管理git提交的客户端——几个月前我还安装了Homebrew。我尝试运行
sudo brew update
-它给了我以下日志:


已经是最新的。

您尝试过这个吗?珠宝盒-官方OS X RVMGUI@Strik3r我刚刚下载了它——这似乎是管理ruby gems的好方法——但是这个应用程序会自动为我安装rvm吗?是的。试试这是一个不错的appFor
权限被拒绝
试试sudo命令<代码>\curl-Lhttps://get.rvm.io |sudobash-s stable--rails--autolibs=enabled谢谢@strick3r,它工作得很好-将此作为答案发布,我会接受的。
\curl -L https://get.rvm.io | bash -s stable --rails --autolibs=enabled