Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
Help us understand the problem. What is going on with this article?

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

More than 1 year has passed since last update.

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

suzukalight
フロントエンドエンジニア (RELATIONS株式会社) / 一口馬主(キャロット) / JavaScript / 電子工作 / ボードゲーム / 競馬 / 座右の銘は「なければ作ればいいじゃない。」
https://suzukalight.com
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away