【发布时间】:2021-02-15 05:37:54
【问题描述】:
-
在 brew 升级后,我无法再运行任何 Ruby on Rails 应用程序。我收到此错误消息:
: dlopen(/Users/ll/.rbenv/versions/2.6.2/lib/ruby/2.6.0/x86_64-darwin18/openssl.bundle, 9): 库未加载:/usr/local/opt/ openssl/lib/libssl.1.0.0.dylib(加载错误) 引用自:/Users/ll/.rbenv/versions/2.6.2/lib/ruby/2.6.0/x86_64-darwin18/openssl.bundle 原因:找不到图像 - /Users/ll/.rbenv/versions/2.6.2/lib/ruby/2.6.0/x86_64-darwin18/openssl.bundle
-
所以我尝试了
brew switch openssl 1.0.2t
解决方案在这里https://stackoverflow.com/a/59184347/11410556 但是找不到openssl 1.0.2t,我的版本是openssl@1.1 1.1.1h
- 然后我尝试了
brew 卸载 --ignore-dependencies openssl brew tap-new $USER/old-openssl brew extract --version=1.0.2t openssl $USER/old-openssl 冲泡安装 openssl@1.0.2t ln -s /usr/local/Cellar/openssl@1.0.2t/1.0.2t /usr/local/opt/openssl
在这里建议:https://stackoverflow.com/a/64479513/11410556。 但是当我跑的时候
brew switch openssl 1.0.2t
我收到此错误:
openssl does not have a version “1.0.2t” in the Cellar.
openssl’s installed versions
-
所以我选择了这个解决方案
brew unlink openssl@1.1 酿造链接 openssl@1.0.2t
然后得到:
Warning: Refusing to link macOS provided/shadowed software: openssl@1.0.2t
If you need to have openssl@1.0.2t first in your PATH run:
echo ‘export PATH=“/usr/local/opt/openssl@1.0.2t/bin:$PATH”’ >> ~/.zshrc
For compilers to find openssl@1.0.2t you may need to set:
export LDFLAGS=“-L/usr/local/opt/openssl@1.0.2t/lib”
export CPPFLAGS=“-I/usr/local/opt/openssl@1.0.2t/include”
For pkg-config to find openssl@1.0.2t you may need to set:
export PKG_CONFIG_PATH=“/usr/local/opt/openssl@1.0.2t/lib/pkgconfig”
-
我跑了第一选择:
echo 'export PATH="/usr/local/opt/openssl@1.0.2t/bin:$PATH"' >> ~/.zshrc
重启我的服务器,现在我有
omz_urlencode:2: /usr/local/bin/pygmentize: bad interpreter: /usr/local/opt/python/bin/python2.7: no such file or directory (edited)
不管我做什么。
- 我不习惯尝试我不理解的事情,我认为我走得太远了。 如果能帮助我摆脱这种混乱局面,我将不胜感激。
【问题讨论】:
-
我猜 ruby 是针对被删除的 OpenSSL 版本构建的。可能最容易针对新安装的 OpenSSL 重新安装 ruby。
-
谢谢你的回答,你能解释一下你会怎么做吗?
-
阅读 rbenv 的文档
标签: python ruby ruby-on-rails-3 openssl