简体   繁体   English

安装 ruby​​ 二进制文件时 rbenv 崩溃

[英]rbenv crashing when installing ruby binaries

I updated this Lenovo laptop to Ubuntu 22.04 LTS, installed Ruby (3.1.2), rbenv (1.1.2), then Rails (7.0.3) without issue.我将这台联想笔记本电脑更新到 Ubuntu 22.04 LTS,安装了 Ruby (3.1.2)、rbenv (1.1.2),然后是 Rails (7.0.3),没有问题。 However, rbenv consistently crashes when I try to install new ruby executables.但是,当我尝试安装新的 ruby​​ 可执行文件时,rbenv 总是崩溃。 Thus far I've tried 2.7.2 (compatible with an old Jekyll blog) and 3.0.2.到目前为止,我已经尝试了 2.7.2(与旧的 Jekyll 博客兼容)和 3.0.2。 GCC 11.2.0 is being used for compilation. GCC 11.2.0 用于编译。 I've reviewed the ruby-build log but don't yet understand how to proceed.我已经查看了 ruby​​-build 日志,但还不知道如何继续。

2.7.2 compilation output shown below. 2.7.2编译输出如下图。 Ideas?想法?


BUILD FAILED (Ubuntu 22.04 using ruby-build 20220426-3-g1038c07)

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

Last 10 log lines:
ripper.y: At top level:
cc1: note: unrecognized command-line option ‘-Wno-self-assign’ may have been intended to silence earlier diagnostics
cc1: note: unrecognized command-line option ‘-Wno-parentheses-equality’ may have been intended to silence earlier diagnostics
cc1: note: unrecognized command-line option ‘-Wno-constant-logical-operand’ may have been intended to silence earlier diagnostics
linking shared-object ripper.so
make[2]: Leaving directory '/tmp/ruby-build.20220526150603.174696.lPGT5x/ruby-2.7.2/ext/ripper'
linking shared-object date_core.so
make[2]: Leaving directory '/tmp/ruby-build.20220526150603.174696.lPGT5x/ruby-2.7.2/ext/date'
make[1]: Leaving directory '/tmp/ruby-build.20220526150603.174696.lPGT5x/ruby-2.7.2'
make: *** [uncommon.mk:295: build-ext] Error 2```

安装以下依赖项( rbenv/ruby-build wiki ),然后尝试构建/安装 ruby​​。

$ apt-get install autoconf bison build-essential libssl-dev libyaml-dev libreadline6-dev zlib1g-dev libncurses5-dev libffi-dev libgdbm6 libgdbm-dev libdb-dev

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM