【问题标题】:BUILD FAILED (Ubuntu 20.04 using ruby-build 20210119)构建失败(Ubuntu 20.04 使用 ruby​​-build 20210119)
【发布时间】:2021-05-20 03:42:00
【问题描述】:

我正在使用 rbenv 并且在 Ec2 实例中我正在尝试安装 ruby​​ 不同的版本,但是当我执行时

rbenv install 2.7.2

发生以下错误。

Downloading ruby-2.7.2.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.7/ruby-2.7.2.tar.bz2
Installing ruby-2.7.2...

BUILD FAILED (Ubuntu 20.04 using ruby-build 20210119)

Inspect or clean up the working tree at /tmp/ruby-build.20210217075101.162094.zs1iDJ
Results logged to /tmp/ruby-build.20210217075101.162094.log

Last 10 log lines:
compiling mjit.c
compiling mjit_compile.c
compiling node.c
compiling numeric.c
compiling object.c
compiling pack.c
compiling parse.c
gcc: fatal error: Killed signal terminated program cc1
compilation terminated.
make: *** [Makefile:421: parse.o] Error 1

同时,我的系统正在使用默认的 ruby​​ 版本

  ubuntu@ip-112-34-9-342:~$ rbenv versions
 * system (set by /home/ubuntu/.rbenv/version)

我不确认是空间问题还是其他问题,空间信息在下面列出。

 ubuntu@ip-112-34-9-342:~$ free
    total        used        free      shared  buff/cache   available
    Mem:         486776      177636       89396         800      219744      287744
    Swap:          0           0           0

【问题讨论】:

  • 可能内存不足。 512MB 还不够编译。
  • @tadman 我怎样才能找到我剩余的内存?上面的统计数据显示我的内存还是我的内存?
  • free -m 应该有 > 1GB 的可用空间来启动。
  • 谢谢你我的免费是 77 :(
  • 这还远远不够。您要么需要更大的实例,要么需要找到预构建的 2.7.2 二进制安装程序。是否有 2.7.2 或足够接近的 Ubuntu 软件包?你能在另一台机器上构建并在那里部署吗?如果可以的话,这就是 Docker 容器非常方便的地方。

标签: ruby-on-rails ruby amazon-ec2 rbenv ruby-2.7


【解决方案1】:

运行以下 -

$ sudo apt install gcc make curl libssl-dev zlib1g-dev

不客气。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2022-07-30
    • 1970-01-01
    • 2016-09-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-04-25
    • 1970-01-01
    相关资源
    最近更新 更多