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
が無事出来た。よかったね。