[英]Unable to install Ruby 2.4.0 using rbenv on Ubuntu 16.04 LTS
[英]Unable to install Ruby on Rails on Ubuntu 16.04 LTS
我刚刚将系统升级到Ubuntu 16.04 LTS(全新安装),并尝试使用RVM安装Ruby。 RVM本身可以很好地安装(使用本指南http://www.webupd8.org/2014/11/how-to-install-rvm-ruby-version-manager.html ),但是当我尝试安装Ruby时,以下错误:
user@user:~$ rvm install 2.3.0
Searching for binary rubies, this might take some time.
No binary rubies available for: ubuntu/16.04/x86_64/ruby-2.3.0.
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/share/rvm/rubies/ruby-2.3.0, this may take a while depending on your cpu(s)...
ruby-2.3.0 - #downloading ruby-2.3.0, this may take a while depending on your connection...
% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
Warning: Failed to create the file ruby-2.3.0.tar.bz2.part: Permission denied
0 13.5M 0 16384 0 0 19826 0 0:11:55 --:--:-- 0:11:55 19811
curl: (23) Failed writing body (0 != 16384)
There was an error(23).
Checking fallback: https://ftp.ruby-lang.org/pub/ruby/2.3/ruby-2.3.0.tar.bz2
% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:00:02 --:--:-- 0
Warning: Failed to create the file ruby-2.3.0.tar.bz2.part: Permission denied
0 13.5M 0 16149 0 0 7324 0 0:32:16 0:00:02 0:32:14 7323
curl: (23) Failed writing body (0 != 16149)
There was an error(23).
Failed download
There has been an error fetching the ruby interpreter. Halting the installation.
这是16.04的普遍问题吗? 确切的方法在15.10下效果很好。 任何想法如何解决?
看起来rvm试图将Ruby安装到/ usr / share / rvm,我认为这意味着它是在系统级别而不是用户级别安装的。 那是你想要的吗? 在这种情况下,可能有必要将rvm作为sudo运行:
user@user:~$ sudo rvm install 2.3.0
为了值钱,我以我(我的用户)身份安装了rvm,这样我就不必打乱特权。 并且我是系统上唯一需要rvm的用户。
尝试重新启动。
我在两次安装Ubuntu 16.04时遇到了相同的问题,两台计算机都遇到了相同的问题,在我重新启动后已得到解决。
rvm install ruby-2.5.0
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.