1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

The Ruby zlib extension was not compiled

Last updated at Posted at 2021-04-28

rbenv で特定のバージョンがインストールできない場合

% rbenv uninstall 2.7.1

BUILD FAILED (macOS 11.2.3 using ruby-build 20200520-14-g1642176)
略
The Ruby zlib extension was not compiled.
ERROR: Ruby install aborted due to missing extensions
Configure options used:
  --prefix=/Users/XXXX/.rbenv/versions/2.7.1
  --with-openssl-dir=/Users/cano/.rbenv/versions/2.7.1/openssl
  --enable-shared
  --with-readline-dir=/usr/local/opt/readline
  CC=clang
  LDFLAGS=-L/Users/cano/.rbenv/versions/2.7.1/lib 
  CPPFLAGS=-I/Users/cano/.rbenv/versions/2.7.1/include 

オプションをつけてインストール

% RUBY_CONFIGURE_OPTS="--with-zlib-dir=$(brew --prefix zlib)" rbenv install 2.7.1

ダメな場合は

% RUBY_CONFIGURE_OPTS="--with-openssl-dir=/usr/local/opt/openssl" rbenv install 2.7.1
1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?