我有一个运行solusVM的vps。我现在正尝试在其中安装ruby 1.9.2。
我正在关注这个指导:
运行此命令后:
apt-get update
apt-get -y install build-essential zlib1g zlib1g-dev libxml2 libxml2-dev libxslt-dev
我收到此错误:
root@makserver:/usr/local/src/ruby-1.9.2-p0# apt-get -f install
Reading package lists... Done
Building dependency tree... Done
Correcting dependencies... Done
The following extra packages will be installed:
libc6
Suggested packages:
glibc-doc
The following packages will be upgraded:
libc6
1 upgraded, 0 newly installed, 0 to remove and 80 not upgraded.
Need to get 0B/4252kB of archives.
After this operation, 4096B disk space will be freed.
Do you want to continue [Y/n]? y
debconf: apt-extracttemplates failed: Bad file descriptor
(Reading database ... 21594 files and directories currently installed.)
Preparing to replace libc6 2.11.1-0ubuntu7.2 (using .../libc6_2.11.1-0ubuntu7.8_amd64.deb) ...
open2: fork failed: Cannot allocate memory at /usr/share/perl5/Debconf/ConfModule.pm line 59
dpkg: error processing /var/cache/apt/archives/libc6_2.11.1-0ubuntu7.8_amd64.deb (--unpack):
subprocess new pre-installation script returned error exit status 12
Errors were encountered while processing:
/var/cache/apt/archives/libc6_2.11.1-0ubuntu7.8_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
有人能告诉我如何纠正这个问题吗?谢谢。
答案1
您链接的指南中有错别字。
初始步骤应为:
sudo apt-get update
sudo apt-get install build-essential zlib1g zlib1g-dev libxml2 libxml2-dev libxslt-dev
sudo apt-get install git-core
sudo apt-get install curl wget
我还删除了-y
标志,并在命令前加上了 sudo,以便您可以(也可能应该)以常规(非 root)用户身份运行这些命令。
我没有apt-get -f install
在该页面上的任何地方看到您提到的命令。必须使用该命令通常意味着某些东西已经损坏。您可能应该从头开始,确保每个步骤都完成。
不过,我认为您不需要做任何这些。
Ubuntu 的 ruby1.9.1 包实际上提供了 Ruby 1.9.2 。
如果你查看 apt-cache show ruby1.9.1 的输出中的详细信息,你会发现 Ubuntu 中提供的版本实际上是1.9.2。
它被列为 1.9.1,因为 Debian 维护者想要描述二进制兼容版本(1.9.1),而不是 Ruby 软件版本(1.9.2)。
看到这个Debian 错误列表条目了解更多信息。
以下是一些输出片段apt-cache show ruby1.9.1
:
Package: ruby1.9.1
Version: 1.9.2.0-1
Filename: pool/universe/r/ruby1.9.1/ruby1.9.1_1.9.2.0-1_i386.deb
[...]
Description: Interpreter of object-oriented scripting language Ruby 1.9.2
Ruby is the interpreted scripting language for quick and easy
object-oriented programming. [...]
This package provides version 1.9.2 series of Ruby, which is binary-compatible
with the 1.9.1 branch.