1
0

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 5 years have passed since last update.

[ Mac OS ] rails installでLibrary not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib (LoadError)が出た時の対処法

Last updated at Posted at 2020-04-08

rails installを叩くとエラーが...

railsをインストールしようとコマンドを叩く。

$ rails install

すると次のエラーが出る。

Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib (LoadError)
  Referenced from: /usr/local/opt/mysql@5.6/lib/libmysqlclient.18.dylib
  Reason: image not found - /Users/~~/~~/~~/vendor/bundle/ruby/2.5.0/gems/mysql2-0.4.10/lib/mysql2/mysql2.bundle

ググって調べて見ると、opensslを再インストールするとか、リンクするとか、rubyを再インストールするとか書いてあった。
しかし、それを試してもうまくいかず。。

解決法

私がやったのはとりあえずopensslを再インストール。

$ brew install openssl

バージョンを確認。

$ openssl version
OpenSSL 1.0.2s  28 May 2019

opensslのバージョンを切り替え。

$ brew switch openssl 1.0.2s

rails installを叩く。

$ rails install

これでいけました!





参考リンク

Railsの環境構築時にLibrary not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib (LoadError)で苦しんだ


1
0
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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?