LoginSignup
2
2

More than 5 years have passed since last update.

brew installでundefined symbol: SSL_CTX_set_alpn_protosと出た時の対処

Posted at

LinuxBrewでpyenvをインストールしようとした時に、依存解決のためのopensslのインストールでエラーが出てしまった。
解決したのでメモ。

事象

$ openssl version
OpenSSL 1.0.2d_1

$ brew install openssl
/home/umanoda/.linuxbrew/opt/curl/bin/curl: symbol lookup error: /home/umanoda/.linuxbrew/Cellar/curl/7.45.0/lib/libcurl.so.4: undefined symbol: SSL_CTX_set_alpn_protos
Trying a mirror...
==> Downloading https://dl.bintray.com/homebrew/mirror/openssl-1.0.2g.tar.gz
/home/umanoda/.linuxbrew/opt/curl/bin/curl: symbol lookup error: /home/umanoda/.linuxbrew/Cellar/curl/7.45.0/lib/libcurl.so.4: undefined symbol: SSL_CTX_set_alpn_protos
Trying a mirror...
==> Downloading https://www.mirrorservice.org/sites/ftp.openssl.org/source/openssl-1.0.2g.tar.gz
/home/umanoda/.linuxbrew/opt/curl/bin/curl: symbol lookup error: /home/umanoda/.linuxbrew/Cellar/curl/7.45.0/lib/libcurl.so.4: undefined symbol: SSL_CTX_set_alpn_protos
Error: Failed to download resource "openssl"
Download failed: https://www.mirrorservice.org/sites/ftp.openssl.org/source/openssl-1.0.2g.tar.gz

どうもopensslを新しくコンパイルする際に必要な共有ライブラリの設定が必要らしい。
openssl-1.0.2dでのみおきる?

LD_LIBRARY_PATH=~/.linuxbrew/Cellar/openssl/1.0.2d_1/lib/ brew upgrade openssl

これでopensslがインストールできた。
このあと brew install pyenv が無事出来た。よかったね。

2
2
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
2
2