簡體   English   中英

沒有足夠的空間來安裝 Ruby - Debian 7

[英]Not Enough Space to Install Ruby - Debian 7

嘗試以 root 用戶身份使用 RVM 安裝 ruby​​ 時出現以下錯誤。

我還有 16gB 的可用空間,所以這不是問題

root@debian:~# rvm install 2.1.0
find: `/root/rvm/rubies': No such file or directory
Searching for binary rubies, this might take some time.
Found remote file https://rvm.io/binaries/debian/7/i386/ruby-2.1.0.tar.bz2
Checking requirements for debian.
Requirements installation successful.
df: `/root/rvm/rubies': No such file or directory
df: no file systems processed
Not enough space (0MB) to install ruby (100MB).
ruby-2.1.0 - #configure
ruby-2.1.0 - #download
/root/rvm/scripts/functions/support: line 166: cd: /root/rvm/archives: No such file or directory
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 22.6M  100 22.6M    0     0   293k      0  0:01:18  0:01:18 --:--:--  417k
md5sum: /root/rvm/archives/bin-ruby-2.1.0.tar.bz2: No such file or directory
Downloaded archive checksum did not match, archive was removed!
If you wish to continue with not matching download add '--verify-downloads 2' after the command.

Downloading https://rvm.io/binaries/debian/7/i386/ruby-2.1.0.tar.bz2 failed.
Mounting remote ruby failed with status 2, trying to compile.
df: `/root/rvm/rubies': No such file or directory
df: no file systems processed
Not enough space (0MB) to install ruby (440MB).

我嘗試使用 --verify-downloads 2 但這沒有幫助

root@debian:~# rvm install 2.1.0 --verify-downloads 2
find: `/root/rvm/rubies': No such file or directory
Searching for binary rubies, this might take some time.
Found remote file https://rvm.io/binaries/debian/7/i386/ruby-2.1.0.tar.bz2
Checking requirements for debian.
Requirements installation successful.
df: `/root/rvm/rubies': No such file or directory
df: no file systems processed
Not enough space (0MB) to install ruby (100MB).
ruby-2.1.0 - #configure
ruby-2.1.0 - #download
/root/rvm/scripts/functions/support: line 166: cd: /root/rvm/archives: No such file or directory
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 22.6M  100 22.6M    0     0   378k      0  0:01:01  0:01:01 --:--:--  281k
md5sum: /root/rvm/archives/bin-ruby-2.1.0.tar.bz2: No such file or directory
Downloaded archive checksum did not match!
ruby-2.1.0 - #validate archive
tar (child): /root/rvm/archives/bin-ruby-2.1.0.tar.bz2: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
tar (child): /root/rvm/archives/bin-ruby-2.1.0.tar.bz2: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
The downloaded package for https://rvm.io/binaries/debian/7/i386/ruby-2.1.0.tar.bz2,
Does not contains single 'bin/ruby' or 'ruby-2.1.0',
Only '' were found instead.
Mounting remote ruby failed with status 4, trying to compile.
df: `/root/rvm/rubies': No such file or directory
df: no file systems processed
Not enough space (0MB) to install ruby (440MB).
root@debian:~# 

以下是我在全新的 Debian 7 安裝上安裝 ruby​​ 的分步過程:

# Install RVM
sudo apt-get install libgdbm-dev libncurses5-dev automake libtool bison libffi-dev
curl -L https://get.rvm.io | bash -s stable
sudo apt-get install curl
curl -L https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
echo "source ~/.rvm/scripts/rvm" >> ~/.bashrc




sudo apt-get install build-essential 
sudo apt-get install curl 
sudo apt-get install zlib1g-dev libreadline-dev libssl-dev libxml2-dev 
curl -sSL https://github.com/wayneeseguin/rvm/tarball/stable -o rvm-stable.tar.gz
mkdir rvm && cd rvm
tar --strip-components=1 -xzf ../rvm-stable.tar.gz
./install --auto-dotfiles
echo "[[ -s "$HOME/rvm/scripts/rvm" ]] && source "$HOME/rvm/scripts/rvm"" >> .bashrc

#Restart BASH
# Install MRI Ruby
rvm list known
rvm install 2.1.0
rvm use 2.1.0 default

有人可以幫助或讓我知道我安裝不正確嗎?

謝謝,-D

嗨,如果您仍然遇到問題,我的解決方案是去這個位置

/usr/local/rvm/archives/rvm/scripts/functions/utility

搜索“df”行,您將找到此代碼

__rvm_calculate_space_free()
{
  # OpenBSD does not have 'df -m' param
  __free_space="$( \command \df "$1" | __rvm_awk 'BEGIN{x=4} /Free/{x=3} $3=="Avail"{x=3} END{print $x}' )"
  if [[ "${__free_space}" == *M ]]
  then __free_space="${__free_space%M}" # some systems ignore -k and print M
  else __free_space="$(( __free_space / 1024 ))"
  fi
}

更換線路

 __free_space="$( \command \df "$1" | __rvm_awk 'BEGIN{x=4} /Free/{x=3} $3=="Avail"{x=3} END{print $x}' )"

__free_space="999999"

或者你想要的任何數字。 這解決了我的問題

我在 Arch Linux Endevour OS 發行版上遇到了問題。
我嘗試了幾種rvm安裝模式,但仍然有一些奇怪的消息

df: /home/juanito/.rvm/rubies: 不存在 el fichero o el Directorio 沒有足夠的空間 (0MB) 來安裝 ruby​​ (440MB)。

我的硬盤上有足夠的可用空間。
我剛剛創建了一個空目錄:

mkdir ~/.rvm/rubies

它開始工作了。

您剛剛在 RVM 的/root/rvm安裝中發現了一個錯誤 - 但不支持也不鼓勵這種類型的安裝,因此我可能不會修復它。

最好的做法是刪除當前損壞的 RVM 安裝,並使用用戶帳戶(不是root )重新開始,如果您更喜歡系統安裝,請使用sudo

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM