rbenv 安装ruby 2.7.2失败问题处理

在ubuntu 16下使用rbenv 安装ruby 2.7.2,总出现如下错误,不能完成安装

BUILD FAILED (Ubuntu 16.04 using ruby-build 20210309)

Inspect or clean up the working tree at /tmp/ruby-build.20210320092618.2977.R5SdiX

Results logged to /tmp/ruby-build.20210320092618.2977.log

Last 10 log lines:

transform_mjit_header: SKIPPED to transform putchar

transform_mjit_header: SKIPPED to transform getchar_unlocked

transform_mjit_header: SKIPPED to transform getc_unlocked

transform_mjit_header: SKIPPED to transform fgetc_unlocked

transform_mjit_header: SKIPPED to transform getchar

ln -sf ../../../.ext/include/x86_64-linux/rb_mjit_min_header-2.7.2.h include/ruby-2.7.0/x86_64-linux/rb_mjit_min_header-2.7.2.h

NoMethodError: undefined method `empty?' for nil:NilClass

  -e at -e:2

uncommon.mk:801: recipe for target '.rbconfig.time' failed

make: *** [.rbconfig.time] Error 1

几乎同样的环境却能安装成功,一直不能查出原因,而且安装ruby 3.0.0也报类似的错误。在top命令下发现启动了java,而且CPU占用很高,通过 rbenv versions发现默认ruby版本是jruby 9.2.14,于是将rbenv下的默认版本换为cruby的任意版本就安装成功了。

©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

相关阅读更多精彩内容

友情链接更多精彩内容