我通过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卡塔琳娜,如果有关系的话。


当前回答

openssl版本没有问题。 在我的情况下,符号链接是缺失的,所以:

sudo ln -s /opt/vagrant/embedded/lib/libssl.1.0.0.dylib /opt/local/lib/libssl.1.0.0.dylib
sudo ln -s /opt/vagrant/embedded/lib/libcrypto.1.0.0.dylib /opt/local/lib/libcrypto.1.0.0.dylib`

成功了。

其他回答

有这个问题时,试图使用LastPass CLI通过阿尔弗雷德在我的卡特琳娜安装。

Brew更新&& Brew升级修复了这个问题。

这是一个比降级openssl更好的选择。

尝试使用install_name_tool:

sudo install_name_tool -change /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/opt/openssl/lib/libssl.1.1.dylib $(which vapor)
sudo install_name_tool -change /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/opt/openssl/lib/libcrypto.1.1.dylib $(which vapor)

在我的情况下,它开始工作时,我使用install_name_tool。参数的顺序如下:旧值(不正确),然后是新值(其中包含openssl),最后是vapor的路径(可以通过$轻松获得(其中包含vapor)。

这可能是一个问题,因为有旧版本的brew和安装的byobu需要新的依赖,为了解决这个问题,运行以下命令

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

我不得不这样降级OpenSSL:

brew uninstall --ignore-dependencies openssl
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/30fd2b68feb458656c2da2b91e577960b11c42f4/Formula/openssl.rb

这是唯一对我有效的解决办法。

这招对我很管用:

brew uninstall openssl
brew tap-new $USER/old-openssl
brew extract --version=1.0.2t openssl $USER/old-openssl
brew install openssl@1.0.2t

来源:https://github.com/kelaberetiv/TagUI/issues/635 # issuecomment - 560138773