Ruby | EOL Ruby를 설치할 수 없습니다.

4144 단어 Ruby
EOL => End Of Life
즉, 2.4 이하 버전의 루비다.
Ruby Lifecycle (EOL)
2.35 rbenv 설치를 시도할 때 다음 오류 로그와 함께 실패했습니다.
그래서 이 글에는 원인과 해결 방법이 기재되어 있다.
아, 겸사겸사 말씀드리지만, 저는 맥입니다.
~ $ rbenv install 2.3.5
ruby-build: using openssl from homebrew
Downloading ruby-2.3.5.tar.bz2...
-> https://cache.ruby-lang.org/pub/ruby/2.3/ruby-2.3.5.tar.bz2
Installing ruby-2.3.5...
ruby-build: using readline from homebrew

BUILD FAILED (OS X 10.15 using ruby-build 20191105)

Inspect or clean up the working tree at /var/folders/6n/8_hv1dkd2bvg1smftl8zybx40000gn/T/ruby-build.20191109131611.38543.IPfI1B
Results logged to /var/folders/6n/8_hv1dkd2bvg1smftl8zybx40000gn/T/ruby-build.20191109131611.38543.log

Last 10 log lines:
installing capi-docs:         /Users/anthony_kiedis/.rbenv/versions/2.3.5/share/doc/ruby
The Ruby openssl extension was not compiled.
ERROR: Ruby install aborted due to missing extensions
Configure options used:
  --prefix=/Users/anthony_kiedis/.rbenv/versions/2.3.5
  --with-openssl-dir=/usr/local/opt/[email protected]
  --with-readline-dir=/usr/local/opt/readline
  CC=clang
  LDFLAGS=-L/Users/anthony_kiedis/.rbenv/versions/2.3.5/lib
  CPPFLAGS=-I/Users/anthony_kiedis/.rbenv/versions/2.3.5/include

까닭


최신 루비-build 2019 1105는 [email protected]에 의존하지만 2.4 이하의 루비가 이에 대응하지 않기 때문이다

참고 자료

  • ruby-build (Homebrew Formulae)
  • Depends on:
    autoconf
    2.69
    Automatic configure script builder
    [email protected]
    1.1.1d
    Cryptography and SSL/TLS Toolkit
    pkg-config
    0.29.2
    Manage compile and link flags for libraries
    readline
    8.0.1
    Library for command-line editing
  • rbenv/ruby-build
  • The openssl extension of Ruby version before 2.4 is not compatible with OpenSSL 1.1.x.

    해결책


    여기에 기재된 것과 같다.
    Cannot install Ruby versions < 2.4 because of [email protected] dependency #1353
    # 対応しているopenssl 1.0.2を入れます
    $ brew install openssl
    
    # 手動で使うopensslの場所を指定してrbenv installします
    $ RUBY_CONFIGURE_OPTS="--with-openssl-dir=/usr/local/opt/openssl" rbenv install 2.3.5
    
    # ちなみに僕はfishユーザなので、fishを使っている人は以下のコマンド
    $ env RUBY_CONFIGURE_OPTS=--with-openssl-dir=/usr/local/opt/openssl/ rbenv install 2.3.5
    
    이상

    좋은 웹페이지 즐겨찾기