将 macos 版本从 Big Sur 更新到 Montrey 会导致 OpenSSL 版本不匹配。根据 30100010 构建,您拥有 30200000

问题描述 投票:0回答:1

我的 osx 版本最初是 Big Sur,SSH 和 SSL 工作正常,直到我更新到 Montrey。

自从更新后,我无法使用 SSH 或从 Github 拉取,并且收到此错误。

OpenSSL version mismatch. Built against 30100010, you have 30200000
fatal: Could not read from remote repository.

到目前为止我做了什么:

我从 homebrew 重新安装了 ruby 和 openssl,并根据我在 github 上找到的解决方案之一再次重新安装了它

brew reinstall ruby
brew reinstall openssl

现在当我这样做时

openssl version -a
这就是结果:

OpenSSL 3.2.0 23 Nov 2023 (Library: OpenSSL 3.2.0 23 Nov 2023)
built on: Thu Nov 23 13:20:19 2023 UTC
platform: darwin64-x86_64-cc
options:  bn(64,64)
compiler: clang -fPIC -arch x86_64 -O3 -Wall -DL_ENDIAN -DOPENSSL_PIC -D_REENTRANT -DOPENSSL_BUILDING_OPENSSL -DNDEBUG
OPENSSLDIR: "/usr/local/etc/openssl@3"
ENGINESDIR: "/usr/local/Cellar/openssl@3/3.2.0_1/lib/engines-3"
MODULESDIR: "/usr/local/Cellar/openssl@3/3.2.0_1/lib/ossl-modules"
Seeding source: os-specific
CPUINFO: OPENSSL_ia32cap=0x7ffaf3ffffebffff:0x29c6fbf

where openssl
的输出:

/usr/local/opt/openssl/bin/openssl
/usr/local/opt/openssl/bin/openssl
/usr/local/opt/openssl/bin/openssl
/Users/m-store/opt/anaconda3/bin/openssl
/usr/local/bin/openssl
/usr/bin/openssl

which openssl
的输出:

/usr/local/opt/openssl/bin/openssl

brew link --force openssl
的输出:

Warning: Already linked: /usr/local/Cellar/openssl@3/3.2.0_1
To relink, run:
  brew unlink openssl@3 && brew link openssl@3

nano ~/.zshrc
的输出:

export PATH="$PATH:/usr/local/Cellar/openssl@3/3.2.0_1/bin/openssl"
export ANDROID_HOME=/Users/m-store/Library/Android/sdk
export GPG_TTY=$(tty)
export ANDROID_SDK_ROOT=/Users/m-store/Library/Android/sdk
export ANDROID_AVD_HOME=/Users/m-store/.android/avd
export PATH=$PATH:/usr/local/sbin
alias pip='noglob pip'
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/Users/m-store/opt/anaconda3/bin/conda' 'shell.zsh' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
    eval "$__conda_setup"
else
    if [ -f "/Users/m-store/opt/anaconda3/etc/profile.d/conda.sh" ]; then
        . "/Users/m-store/opt/anaconda3/etc/profile.d/conda.sh"
    else
        export PATH="/Users/m-store/opt/anaconda3/bin:$PATH"
    fi
fi
unset __conda_setup
# <<< conda initialize <<<
# Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
export PATH="$PATH:$HOME/.rvm/bin"
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
# The next line updates PATH for the Google Cloud SDK.
if [ -f '/Users/m-store/google-cloud-sdk/path.zsh.inc' ]; then . '/Users/m-store/google-cloud-sdk/path.zsh.inc'; fi
# The next line enables shell command completion for gcloud.
if [ -f '/Users/m-store/google-cloud-sdk/completion.zsh.inc' ]; then . '/Users/m-store/google-cloud-sdk/completion.zsh.inc'; fi
export PATH="/usr/local/opt/libpq/bin:$PATH"
export PATH="/usr/local/opt/openssl/bin:$PATH"
export PATH="/usr/local/opt/openssl/bin:$PATH"
export PATH="/usr/local/opt/openssl/bin:$PATH"

尽管如此,错误仍然存在,我查看了与此相关的每一篇文章并尝试实现它们但无法实现,其中大多数是针对 ubuntu 和 apt 包管理器的。

如果有人能提供一些说明,我将不胜感激,提前谢谢您。

git macos ssh openssl homebrew
1个回答
0
投票

尝试运行

brew install openssh
它对我有用。

© www.soinside.com 2019 - 2024. All rights reserved.