Ruby 安装RVM:获取错误“;有一个错误(23)。”;
我正在尝试安装Ruby版本管理器(RVM),但没有成功。 如何克服我遇到的这个错误Ruby 安装RVM:获取错误“;有一个错误(23)。”;,ruby,ubuntu,rvm,Ruby,Ubuntu,Rvm,我正在尝试安装Ruby版本管理器(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
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$
您的RVM安装在
/usr/local/RVM
-通常称为系统安装,这要求您的用户ubuntu
将添加到RVM
组:
rvm group add rvm "$USER"
是使用$USER
它将被您的shell替换为您的用户名
然后注销并登录,确保使用:
id
您的用户在rvm
组中
最后,以防RVM的更新权限:
rvm fix-permissions
如果您在默认情况下使用as安装
rvm
,则@mpasis的解决方案可能不起作用,因为copy+paste
将作为root
安装。
尝试安装
rvm
而不安装sudo
或安装curl
,如上所述。尝试访问此网站,看看是否可以从那里下载tar文件:它似乎试图将文件下载到您没有写入权限的目录。使用--debug
标志(即rvm--debug install…
)获得更详细的输出并更新您的问题。嘿,伙计,接受答案。解决方案工作正常!修正了我的问题。非常感谢。干杯,不过我必须重新启动计算机,而不仅仅是注销。您还可以运行su-$USER
来更新您的用户权限,而无需注销和再次登录。然后,id
应将您列为rvm组的一部分。我正在使用Linux Mint,遇到了同样的问题,尝试了这个解决方案,但没有成功,我不得不运行sudo chown-R$USER:rvm/usr/share/rvm/
顺便说一句,rvm的安装路径现在是/usr/share/rvm
,如Ubuntu安装中所述: