尝试安装RVM时权限被拒绝?

时间:2013-12-24 03:23:19

标签: ruby-on-rails ruby bash terminal

我将我的Macbook主目录从“macbookpro”重命名为“hmumin”。

然后我尝试使用以下方法安装RVM:

$ curl -L https://get.rvm.io | bash -s

但是我收到了错误:

mkdir: /Users/macbookpro/.rvm/src: Permission denied

尝试在以前的主目录中安装RVM会出现此错误吗?

如果我跑:

open /Users/macbookpro

我明白了:

The file /Users/macbookpro does not exist.

然而,如果我跑:

mkdir /Users/macbookpro

我明白了:

mkdir: /Users/macbookpro: Permission denied

这很混乱,我只想安装RVM。

当我输入RVM时,我也会遇到这种类型的错误:

cat: /Users/macbookpro/.rvm/VERSION: No such file or directory
Warning! PATH is not properly set up, '/Users/macbookpro/.rvm/gems/ruby-2.0.0-           p353@railstutorial_rails_4_0/bin' is not at first place,
     usually this is caused by shell initialization files - check them for 'PATH=...' entries,
     it might also help to re-add RVM to your dotfiles: 'rvm get stable --auto-dotfiles',
        to fix temporarily in this shell session run: 'rvm use ruby-2.0.0-
p353@railstutorial_rails_4_0'.
     -bash: /Users/macbookpro/.rvm/scripts/base: No such file or directory
     -bash: /Users/macbookpro/.rvm/scripts/help: No such file or directory
     hmumin:~ hmumin$ 

1 个答案:

答案 0 :(得分:0)

听起来您有多个问题,需要先单独解决,然后才能成功安装RVM:

  1. 您无法重命名主目录,并希望机器满意。有多个位置可跟踪您的主目录名称,包括维护用户和组信息的安全系统。您需要检查“Ask Different”以了解如何从这种情况中正确恢复,然后检查如何正确更改主目录,因为它不适用于Stack Exchange。
  2. 仔细阅读instructions for RVM installation处的http://rvm.io/rvm/install。 RVM是一个非常易于安装的Ruby管理器,但在开始安装之前,您必须先做出决定。我强烈建议您进行单用户安装,但无论您选择哪种方式,都要先阅读整个页面。