前提・実現したいこと
rails6でアプリを作成中、bundle installを行うと9): Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib (LoadError)
というエラーが発生するようになりました。
####実現したいこと
1.bundle installが正常に行うことができて、アプリ作成作業に戻る
(2.可能であれば同様の案件について知識を習得できる方法で、おすすめの書籍や勉強方法、学習サイトなどについてご教示いただきたい)
発生している問題・エラーメッセージ
bundle installが実行できない
該当のソースコード
ruby
1Ignoring bcrypt-3.1.13 because its extensions are not built. Try: gem pristine bcrypt --version 3.1.13 2Ignoring bigdecimal-1.4.4 because its extensions are not built. Try: gem pristine bigdecimal --version 1.4.4 3(中略) 4Ignoring zlib-1.1.0 because its extensions are not built. Try: gem pristine zlib --version 1.1.0 5Traceback (most recent call last): 6 33: from /Users/Ken/.rbenv/versions/2.5.1/bin/bundle:23:in `<main>' 7 32: from /Users/Ken/.rbenv/versions/2.5.1/bin/bundle:23:in `load' 8 31: from /Users/Ken/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-2.0.2/exe/bundle:22:in `<top (required)>' 9 30: from /Users/Ken/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-2.0.2/lib/bundler/friendly_errors.rb:124:in `with_friendly_errors' 10 29: from /Users/Ken/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-2.0.2/exe/bundle:30:in `block in <top (required)>' 11 28: from /Users/Ken/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-2.0.2/lib/bundler/cli.rb:18:in `start' 12 27: from /Users/Ken/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-2.0.2/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start' 13 26: from /Users/Ken/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-2.0.2/lib/bundler/cli.rb:27:in `dispatch' 14 25: from /Users/Ken/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-2.0.2/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch' 15 24: from /Users/Ken/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-2.0.2/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command' 16 23: from /Users/Ken/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-2.0.2/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run' 17 22: from /Users/Ken/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-2.0.2/lib/bundler/cli.rb:234:in `install' 18 21: from /Users/Ken/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-2.0.2/lib/bundler/settings.rb:144:in `temporary' 19 20: from /Users/Ken/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-2.0.2/lib/bundler/cli.rb:235:in `block in install' 20 19: from /Users/Ken/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-2.0.2/lib/bundler/cli/install.rb:53:in `run' 21 18: from /Users/Ken/.rbenv/versions/2.5.1/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require' 22 17: from /Users/Ken/.rbenv/versions/2.5.1/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require' 23 16: from /Users/Ken/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-2.0.2/lib/bundler/fetcher.rb:8:in `<top (required)>' 24 15: from /Users/Ken/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-2.0.2/lib/bundler/fetcher.rb:10:in `<module:Bundler>' 25 14: from /Users/Ken/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-2.0.2/lib/bundler/fetcher.rb:217:in `<class:Fetcher>' 26 13: from /Users/Ken/.rbenv/versions/2.5.1/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require' 27 12: from /Users/Ken/.rbenv/versions/2.5.1/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require' 28 11: from /Users/Ken/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/bundler-2.0.2/lib/bundler/fetcher/index.rb:4:in `<top (required)>' 29 10: from /Users/Ken/.rbenv/versions/2.5.1/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require' 30 9: from /Users/Ken/.rbenv/versions/2.5.1/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require' 31 8: from /Users/Ken/.rbenv/versions/2.5.1/lib/ruby/site_ruby/2.5.0/rubygems/remote_fetcher.rb:5:in `<top (required)>' 32 7: from /Users/Ken/.rbenv/versions/2.5.1/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require' 33 6: from /Users/Ken/.rbenv/versions/2.5.1/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require' 34 5: from /Users/Ken/.rbenv/versions/2.5.1/lib/ruby/site_ruby/2.5.0/rubygems/s3_uri_signer.rb:3:in `<top (required)>' 35 4: from /Users/Ken/.rbenv/versions/2.5.1/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require' 36 3: from /Users/Ken/.rbenv/versions/2.5.1/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require' 37 2: from /Users/Ken/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/openssl-2.1.2/lib/openssl.rb:13:in `<top (required)>' 38 1: from /Users/Ken/.rbenv/versions/2.5.1/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require' 39/Users/Ken/.rbenv/versions/2.5.1/lib/ruby/site_ruby/2.5.0/rubygems/core_ext/kernel_require.rb:54:in `require': dlopen(/Users/Ken/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/openssl-2.1.2/lib/openssl.bundle, 9): Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib (LoadError) 40 Referenced from: /Users/Ken/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/openssl-2.1.2/lib/openssl.bundle 41 Reason: image not found - /Users/Ken/.rbenv/versions/2.5.1/lib/ruby/gems/2.5.0/gems/openssl-2.1.2/lib/openssl.bundle
試したこと
- brew update ,brew upgrade(下記記事ほか多数)
エラー文に変化もなく変わらず。
https://qiita.com/utsu_jimmy/items/a35437faea1c0d2f357d
- opensslにて再設定
opensslに関する別の設定エラー?が起きた上、解決せず。
libresslがmacの標準であるという知識が不足しており、問題が複雑化すると考えたため以後libresslに戻しました。
https://github.com/kelaberetiv/TagUI/issues/86
- homebrewの再インストール
- brew link libressl --force
Warning: Refusing to link macOS-provided software: libressl If you need to have libressl first in your PATH run: echo 'export PATH="/usr/local/opt/libressl/bin:$PATH"' >> ~/.zshrc For compilers to find libressl you may need to set: export LDFLAGS="-L/usr/local/opt/libressl/lib" export CPPFLAGS="-I/usr/local/opt/libressl/include" For pkg-config to find libressl you may need to set: export PKG_CONFIG_PATH="/usr/local/opt/libressl/lib/pkgconfig"
というエラーメッセージが出たためexport 以下4つをzshrcに保存し、sourceで反映しましたが変化なし。
補足情報(FW/ツールのバージョンなど)
mac os : catalina10.15.2(作業途中にmojavaから移行してしまったため、bashをzshに置き換えて作業しています)
ruby : 2.5.1p57 (2018-03-29 revision 63029) [x86_64-darwin19]
rails : 6.0.1
libressl,homebrew,rbenv