rvm ruby​​ 安装不适用于 2.2

问题描述

我在 OSX 中遇到错误

rvm install 2.2

我能够很好地安装 Ruby 2.5。但是使用 2.2 我得到:

//  rvm install "ruby-2.2.10" --with-openssl-dir=/usr/local/opt/openssl
ruby-2.2.10 - #removing src/ruby-2.2.10..
Checking requirements for osx.
Installing requirements for osx.
Updating system..........
Installing required packages: openssl.
Certificates bundle '/usr/local/etc/openssl@1.1/cert.pem' is already up to date.
Requirements installation successful.
Installing Ruby from source to: /Users/jeffslutzky/.rvm/rubies/ruby-2.2.10,this may take a while depending on your cpu(s)...
ruby-2.2.10 - #downloading ruby-2.2.10,this may take a while depending on your connection...
ruby-2.2.10 - #extracting ruby-2.2.10 to /Users/jeffslutzky/.rvm/src/ruby-2.2.10.....
ruby-2.2.10 - #applying patch /Users/jeffslutzky/.rvm/patches/ruby/2.2.10/fix_installing_bundled_gems.patch.
ruby-2.2.10 - #configuring.....................................................-
ruby-2.2.10 - #post-configuration.
ruby-2.2.10 - #compiling....
Error running '__rvm_make -j4',please read /Users/jeffslutzky/.rvm/log/1611519469_ruby-2.2.10/make.log

There has been an error while running make. Halting the installation.

当我打开日志文件时,它对我来说毫无意义。开始:

__rvm_make () 
{ 
    \make "$@" || return $?
}
current path: /Users/jeffslutzky/.rvm/src/ruby-2.2.10
GEM_HOME=/Users/jeffslutzky/.rvm/gems/ruby-2.5.8
PATH=/usr/local/opt/coreutils/bin:/usr/local/opt/pkg-config/bin:/usr/local/opt/libtool/bin:/usr/local/opt/automake/bin:/usr/local/opt/autoconf/bin:/Users/jeffslutzky/.rvm/gems/ruby-2.5.8/bin:/Users/jeffslutzky/.rvm/gems/ruby-2.5.8@global/bin:/Users/jeffslutzky/.rvm/rubies/ruby-2.5.8/bin:/Users/jeffslutzky/.rvm/bin:/Library/Frameworks/Python.framework/Versions/3.6/bin:/Applications/Postgres.app/Contents/Versions/latest/bin:/usr/local:/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin
GEM_PATH=/Users/jeffslutzky/.rvm/gems/ruby-2.5.8:/Users/jeffslutzky/.rvm/gems/ruby-2.5.8@global
command(2): __rvm_make -j4
++ make -j4

然后是一堆东西,它结束了:

encoding.c:825:2: error: implicit declaration of function 'rb_str_change_terminator_length' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        rb_str_change_terminator_length(obj,oldtermlen,termlen);
        ^
1 error generated.
make: *** [encoding.o] Error 1
make: *** Waiting for unfinished jobs....
++ return 2

这是怎么回事?

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)