我通过homebrew安装了vapor,然后立即想通过执行vapor new Hello进入一个项目,但随后在终端中得到了以下消息:

dyld: Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
Referenced from: /usr/local/bin/vapor
Reason: image not found
zsh: abort      vapor new Hello

我尝试了一些方法来解决这个问题,比如通过brew卸载并重新安装openssl,但这并不奏效。我还尝试了一些我在网上找到的东西,但没有工作。我认为这与蒸汽只适用于1.0.0版本有关,而不是1.1.1版本,这就是我所拥有的。我想我需要降级到1.0.0,但我是怎么做到的?我在用MacOS卡塔琳娜,如果有关系的话。


当前回答

如果你没有家酿咖啡或者不知道是什么

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update && brew upgrade
brew uninstall openssl; brew uninstall openssl; brew install https://github.com/tebelorg/Tump/releases/download/v1.0.0/openssl.rb

或者如果你已经安装了Homebrew

brew update && brew upgrade
brew uninstall openssl; brew uninstall openssl; brew install https://github.com/tebelorg/Tump/releases/download/v1.0.0/openssl.rb

这在Mac 10.15上适用

其他回答

brew switch openssl 1.0.2t

凯特琳娜,没事的。

这个帖子有很多答案,但没有一个对我有用。最上面的答案也暗示着降级:

酿造开关…调用酿造开关被禁用!

这招对我很管用:

brew install rbenv/tap/openssl@1.0
ln -sfn /usr/local/Cellar/openssl@1.0/1.0.2t /usr/local/opt/openssl

在这里找到:https://github.com/kelaberetiv/TagUI/issues/86 (我需要在OSX 10.13.x上运行旧的mongodb 3.4)

更新:截至2020年12月及以后,酿造开关不工作,所以使用@angabriel的另一个答案:

brew install rbenv/tap/openssl@1.0
ln -sfn /usr/local/Cellar/openssl@1.0/1.0.2t /usr/local/opt/openssl

最初的回答: 切换到旧的openssl包

brew switch openssl 1.0.2s

或者,根据您的具体系统配置,您可能需要切换到不同的版本。查看ls -al /usr/local/Cellar/openssl的输出信息,查看要切换到的版本号。

brew switch openssl 1.0.2q
# or
brew switch openssl 1.0.2r
# or 
brew switch openssl 1.0.2s
# or
brew switch openssl 1.0.2t
# etc...

酿造openssl 1.0.2s开关

为我工作过“macOS Mojave”,“10.14.6版本”。

我在尝试用postgresql运行rails时遇到了类似的错误。(我发现这是为了寻找解决方案。当Homebrew切换到开放SSL 1.1.1时,它破坏了很多东西)上面的答案对我不起作用(Mac 10.14.6)。然而,在这里找到的答案是:

brew install --upgrade openssl
brew reinstall postgresql