mac安装nvm报错 :HTTP/2 stream 1 was not closed cleanly before end of the underlying stream 解决方案

1. http/1.1

在mac安装nvm时,在解决了443的错误之后,又提示 git 拉取 的错误

fatal: unable to access 'https://github.com/nvm-sh/nvm.git/'
:HTTP/2 stream 1 was not closed cleanly before end of the underlying stream

通过排查发现,是 git 默认使用的通信协议出现了问题,可以通过将默认通信协议修改为 http/1.1 来解决该问题。

git config --global http.version HTTP/1.1

这样改为 http/1.1 之后,我们再回到终端,按照执行 nvm官网提示进行安装即可。

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash

安装完成之后,执行 nvm --version ,如果有版本,则表明安装成功。

如果仍然提示command not found: nvm,则还需最后一步,请看这篇文章《ac安装nvm成功,关闭终端后,仍然报错:zsh: command not found:nvm 解决方案》。文章来源地址https://uudwc.com/A/5ZLdg

原文地址:https://blog.csdn.net/MRlaochen/article/details/125381478

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请联系站长进行投诉反馈,一经查实,立即删除!

h
上一篇 2023年07月10日 23:48
Git 小乌龟(TortoiseGit)的详细使用
下一篇 2023年07月10日 23:51