Errors installing RVM

2020-04-18 03:44发布

问题:

I'm trying to install rvm on redhat 5.5 and I'm getting this error:

[mc@owl-ci ~]$ bash < <( curl http://rvm.beginrescueend.com/releases/rvm-install-head )
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   979  100   979    0     0   8168      0 --:--:-- --:--:-- --:--:--  318k
Cloning into rvm...
remote: Counting objects: 18463, done.
remote: Compressing objects: 100% (4985/4985), done.
remote: Total 18463 (delta 12517), reused 17903 (delta 12002)
Receiving objects: 100% (18463/18463), 3.19 MiB, done.
Resolving deltas: 100% (12517/12517), done.
mkdir: cannot create directory `/archives': Permission denied
mkdir: cannot create directory `/src': Permission denied
mkdir: cannot create directory `/log': Permission denied
mkdir: cannot create directory `/gems': Permission denied
mkdir: cannot create directory `/man': Permission denied
mkdir: cannot create directory `/rubies': Permission denied
mkdir: cannot create directory `/config': Permission denied
mkdir: cannot create directory `/user': Permission denied

I've install rvm before on different machines with no problems.

I'm confused on why it's trying to create directories under the root path, I thought everything went under ~/.rvm (therefore shouldn't have problems with permission)

回答1:

Okay so apparently my old answer wouldn't actually give you a functioning rvm installation. There appears to be a very recent bug that I will report. In the meantime, follow the instructions here:

http://rvm.io/rvm/install/

Under the section "Installing / updating the latest rvm from the latest source tarball"

Old Answer:

Try downloading the rvm install script: curl http://rvm.beginrescueend.com/releases/rvm-install-head > rvm-install-head

Then find the line: rvm_path="${rvm_path:-"$HOME/.rvm"}"

and add "export" in the front: export rvm_path="${rvm_path:-"$HOME/.rvm"}"

Save and run the modified file: bash < rvm-install-head



回答2:

Only use RVM 1.5.1+ or latest head.

You may now install as user or root. Do not use the system-wide script any longer.

bash < <( curl -s -k https://rvm.beginrescueend.com/install/rvm )

For the most recent information and best practices on the correct way to install RVM, please read the documentation website. Also be sure to read the RVM basics documentation.

~Wayne



回答3:

It looks like 1.3.0 is broken for the moment. Checkout 1.2.9 in ~/.rvm/src/rvm for a working version.