[英]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.