安装RVM:收到错误"出现错误(23)."

Kim*_*a K 38 ruby ubuntu rvm

我试图安装Ruby Version Manager(RVM)但没有成功.如何解决我得到的这个错误?

ubuntu@ip-172-31-0-20:/tmp$ rvm install ruby-1.9.3-p484
Searching for binary rubies, this might take some time.
No binary rubies available for: ubuntu/14.04/x86_64/ruby-1.9.3-p484.
Continuing with compilation. Please read 'rvm help mount' to get more information on binary rubies.
Checking requirements for ubuntu.
Requirements installation successful.
Installing Ruby from source to: /usr/local/rvm/rubies/ruby-1.9.3-p484, this may take a while depending on your cpu(s)...
ruby-1.9.3-p484 - #downloading ruby-1.9.3-p484, this may take a while depending on your connection...
Warning: Failed to create the file ruby-1.9.3-p484.tar.bz2.part: Permission
Warning: denied
  0 9806k    0  1002    0     0  22905      0  0:07:18 --:--:--  0:07:18 23302
curl: (23) Failed writing body (0 != 1002)
There was an error(23).
Checking fallback: http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p484.tar.bz2
Warning: Failed to create the file ruby-1.9.3-p484.tar.bz2.part: Permission
Warning: denied
  0 9806k    0  1167    0     0   4300      0  0:38:55 --:--:--  0:38:55  4290
curl: (23) Failed writing body (0 != 1167)
There was an error(23).
Failed download
There has been an error fetching the ruby interpreter. Halting the installation.
ubuntu@ip-172-31-0-20:/tmp$
Run Code Online (Sandbox Code Playgroud)

mpa*_*pis 121

您的RVM安装在/usr/local/rvm- 它通常称为系统安装,这要求您的用户ubuntu将被添加到rvm组:

rvm group add rvm "$USER"
Run Code Online (Sandbox Code Playgroud)

是的使用$USER它将被您的shell替换为您的用户名

然后注销并登录,确保:

id
Run Code Online (Sandbox Code Playgroud)

您的用户在rvm群组中,

最后,以防万一RVM的更新权限:

rvm fix-permissions
Run Code Online (Sandbox Code Playgroud)

  • 干杯,虽然我不得不重新启动计算机,而不仅仅是注销. (7认同)
  • @TylerDurden - 是的..重启让它也适合我!谢谢 (2认同)
  • 您还可以运行 `su - $USER` 来更新您的用户权限,而无需注销和再次登录。然后`id`应该将你列为rvm组的一部分 (2认同)