首页 > 解决方案 > 库未加载 libssl.1.0.0.dylib

问题描述

我正在尝试修复我在 Dragonfly 中遇到的错误,因为我的图像没有解码委托,我发现的解决方案之一是删除 Imagemagick,然后从源代码重新安装。从那时起,每当我尝试启动我的 rails 服务器、捆绑安装或添加任何 ruby​​ gem 时,我都会收到以下错误消息。

/Users/username/.rbenv/versions/2.1.2/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': dlopen(/Users/username/.rbenv/versions/2.1.2/lib/ruby/2.1.0/x86_64-darwin18.0/openssl.bundle, 9): Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib (LoadError)
  Referenced from: /Users/username/.rbenv/versions/2.1.2/lib/ruby/2.1.0/x86_64-darwin18.0/openssl.bundle
  Reason: image not found - /Users/username/.rbenv/versions/2.1.2/lib/ruby/2.1.0/x86_64-darwin18.0/openssl.bundle

我试过删除并重新安装openssl,brew更新/升级。它没有让步。

标签: ruby-on-railsrubyruby-on-rails-4openssl

解决方案


gem uninstall mysql2
brew install openssl
gem install mysql2 -- --with-opt-dir="$(brew --prefix openssl)"

这对我有用。


推荐阅读