ruby-on-rails - 库未加载 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更新/升级。它没有让步。
解决方案
gem uninstall mysql2
brew install openssl
gem install mysql2 -- --with-opt-dir="$(brew --prefix openssl)"
这对我有用。
推荐阅读
- c - SDL 颜色“轮”
- python - sns.jointplot 中的类型错误
- algorithm - MST algorithm by picking minimum edge from each vertex?
- javascript - 如何将 CSS 添加到 chartJS 图像点样式?
- asp.net - 无法连接到nuget
- javascript - 按文本选择jquery中的选项
- flutter - 在 dart 中过滤具有多个下拉列表的列表
- html - 如何发送带参数的外部 html 页面
- python - 将 3D 矩阵压缩为向量数组,其中索引为向量
- java - 在 Raspbian 上下载 Java 时出错,“超过 20 个重定向”