9
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

[MEMO] gem コマンドで Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib が出たときの対処法

Last updated at Posted at 2020-01-08

foreman動かしたいからgemを叩いたら怒られた案件;

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

結論としては、rbenvでいったんuninstallしてからinstallしなおす。そうするとopenssl向けのライブラリを再度構成してくれるっぽい;

$ rbenv uninstall 2.6.2
$ rbenv install 2.6.2
Downloading openssl-1.1.1d.tar.gz...

$ gem install foreman

(ここでターミナルを起こし直す)

$ foreman start -f Procfile.app.dev

ちなみに brew update && brew upgrade もやったけど、こちらは効果がなかった。

reference: https://teratail.com/questions/225461

9
6
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
9
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?