简体   繁体   中英

Permission denied when trying to install RVM?

I renamed my Macbook home directory to "hmumin" from "macbookpro".

I then tried to install RVM using:

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

but I get an error:

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

Is this error from trying to install RVM in the previous home directory?

If I run:

open /Users/macbookpro

I get:

The file /Users/macbookpro does not exist.

Yet, if I run:

mkdir /Users/macbookpro

I get:

mkdir: /Users/macbookpro: Permission denied

It's pretty confusing, I just want to install RVM.

When I type RVM I also get this type of error:

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$ 

It sounds like you have multiple problems, and they need to be addressed individually before you can successfully install RVM:

  1. You can't rename your home directory and expect a machine to be happy. There are multiple places that track your home directory name, including the security system that maintains the user and group information. You need to check on " Ask Different " for how to correctly recover from this situation, and then how to correctly change your home directory as it is off-topic for Stack Exchange.
  2. Carefully read the instructions for RVM installation at http://rvm.io/rvm/install . RVM is a very easy-to-install Ruby manager, however there are decisions you have to make up front, before you begin installing it. I'd strongly recommend you do the single-user installation, but, no matter which you choose, read the entire page first.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM