没有足够的空间来安装Ruby - Debian 7

时间:2014-09-30 23:58:41

标签: ruby debian rvm

尝试使用RVM作为root用户安装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

3 个答案:

答案 0 :(得分:2)

嗨如果您仍然遇到此问题,我的解决方案就是去这个地方

的/ usr /本地/ RVM /档案/ RVM /脚本/功能/效用

搜索线" 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"

或者你想要的任何数字。这解决了我的问题

答案 1 :(得分:1)

您刚刚在/root/rvm安装RVM时发现了一个错误 - 但是不支持此类安装,因此我不鼓励这样做。

最好的做法是删除当前已损坏的RVM安装,并使用用户帐户(而不是root)重新开始,如果您更喜欢使用sudo进行系统安装。

答案 2 :(得分:0)

我在Arch Linux Endevour OS发行版上遇到问题。
我尝试了几种rvm安装模式,但仍然收到一些奇怪的消息

df:/home/juanito/.rvm/rubies:不存在el fichero o el Directorio 没有足够的空间(0MB)来安装ruby(440MB)。

我的硬盘上有足够的可用空间。
我刚刚创建了一个空目录:

mkdir ~/.rvm/rubies

它开始工作。