在Ubuntu 10中编译错误

时间:2011-02-19 03:00:55

标签: ruby ubuntu

嘿伙计们 我有一个运行solusVM的vps。我现在正在尝试在其中安装ruby 1.9.2。

我遵循guide

运行此命令后

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)

任何人都可以告诉我如何纠正这个问题。感谢

2 个答案:

答案 0 :(得分:1)

这是一个ubuntu问题,属于superuser.com

试试这个:
1. apt-get -f install build-essential zlib1g zlib1g-dev libxml2 libxml2-dev libxslt-dev
2. apt-get upgrade build-essential zlib1g zlib1g-dev libxml2 libxml2-dev libxslt-dev
3.再说一遍:apt-get -f install build-essential zlib1g zlib1g-dev libxml2 libxml2-dev libxslt-dev

强制安装可能会解决问题。

答案 1 :(得分:0)

有些事情看起来可能没有足够的RAM或磁盘分配:

fork failed: Cannot allocate memory
dpkg: error processing /var/cache/apt/archives/libc6_2.11.1-0ubuntu7.8_amd64.deb (--unpack):

我同意@zengr,这可能属于superuser.com。