17
12

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 5 years have passed since last update.

pyenv installでMissing the OpenSSL lib?と言われる

Posted at

mojaveで3.7.2入れよ〜とポチったらERROR: The Python ssl extension was not compiled. Missing the OpenSSL lib?と言われるやつ。mojaveはモジャブとしか読めない。

  • mojave 10.14.1
  • Homebrew 2.0.2
  • pyenv 1.2.9
  • 入れたいpython 3.7.2

やったこと

ログでここ見てね、と言われるのでCommon build problemsを見に行く

readlinexzは既に入っていた

brew install readline xz

mojaveか10.14以上の人は入れてね、というやつを入れる

sudo installer -pkg /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg -target /

そもそも上記CommandLineToolsがなかったのでインストール

xcode-select --install

既に入ってるpython は消してね!というので消す

rm -rf ~/.pyenv/versions/2.7.5

Missing the OpenSSL lib?のところに書いてある解決策でチャレンジ

CFLAGS="-I$(brew --prefix openssl)/include" \
LDFLAGS="-L$(brew --prefix openssl)/lib" \
pyenv install -v 3.7.2

眠さで知能指数が下がって「がんばえ〜ぱいえんぶ〜」って気持ちでログを眺めていたが、
応援の甲斐なく同じエラーが出る。駄目じゃん!

ぐぐると他にも駄目じゃん!ってなってる人が調べていて、そのコマンドでチャレンジ
https://blufflog.hatenablog.com/entry/2018/09/25/224259

CONFIGURE_OPTS="--with-openssl=$(brew --prefix openssl)" pyenv install 3.7.2

できた!!!!ありがとう!!!おやすみ!!

17
12
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
17
12

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?