久しぶりに grunt serve したら openssl のロードエラー…

数年前に作ったアプリを久々に改修しようかと思い、まずはビルドできるか試したところ、エラー…。

Warning: Running "compass:server" (compass) task

Warning: Command failed: compass --version
/Users/xxx/.rbenv/versions/2.2.0/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `require': dlopen(/Users/xxx/.rbenv/versions/2.2.0/lib/ruby/2.2.0/x86_64-darwin14/digest/sha1.bundle, 9): 
Library not loaded: /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib (LoadError)

Referenced from: /Users/xxx/.rbenv/versions/2.2.0/lib/ruby/2.2.0/x86_64-darwin14/digest/sha1.bundle
Reason: image not found - /Users/xxx/.rbenv/versions/2.2.0/lib/ruby/2.2.0/x86_64-darwin14/digest/sha1.bundle

なんで ruby?と思ったが、ビルドツールで使われている様子。Warning なので無視してもいけるのか?

前にもあったかな?と思ってブログを検索するとあった。

ブログに書いとくもんやな〜。この時は nodebrew のコマンドで解消したようなので早速確認してみる。

まずは openssl のバージョンを確認。

$ openssl version
LibreSSL 2.8.3

続いて nodebrew でインストール済みの openssl のバージョンを確認。

$ brew list --versions
openssl 1.0.2n 1.0.2l 1.0.2
openssl@1.1 1.1.1h 1.1.1f

エラーに出ているパスを見てみると、1.1 に更新されているのが原因っぽい。

$ ls /usr/local/opt/openssl/lib
engines-1.1             libcrypto.a             libssl.1.1.dylib        libssl.dylib
 libcrypto.1.1.dylib     libcrypto.dylib         libssl.a                pkgconfig

今更 openssl のバージョンを下げるのも違う気がするが、brew switch openssl 1.0.2n をしてみた。

コメントを残す