安装RVM:出错“出现错误(23)。”

安装RVM:出错“出现错误(23)。”

问题描述:

我正在尝试安装Ruby版本管理器(RVM),但没有成功。 如何解决我收到的这个错误?安装RVM:出错“出现错误(23)。”

[email protected]:/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. 
[email protected]:/tmp$ 
+0

尝试去这个网站,看看您是否可以从那里下载tar文件:http: //ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p484.tar.bz2 – ryekayo 2014-10-07 18:28:27

+1

看起来它试图将文件下载到您无权写入的目录。使用'--debug'标志(即'rvm --debug install ...')来获得更详细的输出并更新你的问题。 – 2014-10-07 18:33:19

+0

嘿人,接受答案。解决方案正常工作! – kaleb4eg 2015-06-18 18:38:03

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

rvm group add rvm "$USER" 

是使用$USER它会被外壳程序替换用您的用户名

然后注销并登录,请确保:

id 

你的用户是在rvm组,

终于以防万一RVM的更新权限:

rvm fix-permissions 
+0

修复了我的问题。谢谢! – Hroft 2014-12-22 11:39:17

+0

我的工作人员 – Avdept 2015-03-12 21:26:53

+0

Big Thatnks !!!我花了1小时,找不到解决方案... – kaleb4eg 2015-06-18 18:37:15