LoginSignup
38
25

More than 3 years have passed since last update.

Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib (LoadError)

Last updated at Posted at 2019-12-10

opensslが読み込めない

別アプリでrubyのバージョンアップしたら全然関係ないアプリが見事に死んだよ。
備忘録に残すので誰かのザオリクとして使えますように。

bundlerをインストールしようとするとコケる

ruby入れ直して

gem install bundler

でインストールしようとしたところ

ERROR:  Loading command: install (LoadError)
    dlopen(/Users/~~/.rbenv/versions/2.5.3/lib/ruby/2.5.0/x86_64-darwin18/openssl.bundle, 9): Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
  Referenced from: /Users/~~/.rbenv/versions/2.5.3/lib/ruby/2.5.0/x86_64-darwin18/openssl.bundle
  Reason: image not found - /Users/~~/.rbenv/versions/2.5.3/lib/ruby/2.5.0/x86_64-darwin18/openssl.bundle
ERROR:  While executing gem ... (NoMethodError)
    undefined method `invoke_with_build_args' for nil:NilClass

は?
opensslが読み込めてないと怒られてる。
brew link openssl --forceとかなんかいろいろしたけどあかん。

openssl version

でバージョン確認

OpenSSL 1.1.1d  10 Sep 2019

………

使おうとしてるやつとバージョンちゃうやんけ

openssl再インストール

brew reinstall openssl@1.1

んでgem install bundler

ERROR:  Loading command: install (LoadError)
    dlopen(/Users/~~/.rbenv/versions/2.5.3/lib/ruby/2.5.0/x86_64-darwin18/openssl.bundle, 9): Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
  Referenced from: /Users/~~/.rbenv/versions/2.5.3/lib/ruby/2.5.0/x86_64-darwin18/openssl.bundle
  Reason: image not found - /Users/~~/.rbenv/versions/2.5.3/lib/ruby/2.5.0/x86_64-darwin18/openssl.bundle
ERROR:  While executing gem ... (NoMethodError)
    undefined method `invoke_with_build_args' for nil:NilClass

はい、エラーは変わりません。

ruby再インストール

あれこれしましたがopensslがうまいことインストールされてなさげなので

rbenv install 2.5.3

でrubyごと再インストール。
ここはご自身のバージョンに合わせてくだせぇ。

ruby -v

でバージョン確認。
変わってなかったら

rbenv local 2.5.3

で変更忘れずに。
そして

brew update && brew upgrade

んで

gem install bundler

私はこれで無事復活しました。
原因はおそらく使おうとしてたopensslのバージョンは1.0.0でインストールされてるのは1.1.1dだったことかなと。
ただremoveしてインストールし直してもコケたのでrubyインストール時に何かが失敗してたのかな…
rubyのバージョンアップはやだね…

38
25
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
38
25