欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

在mac上“curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused”-安装NVM

程序员文章站 2022-05-10 16:17:49
...

安装失败的可能原因是没有初始化Xcode

我在网上找了很多资料https://raw.githubusercontent.com/Homebrew/install/master/install说的都是打开着个网址,我打不开
所以下面是我的解决办法:

1.打开网站https://www.ipaddress.com/
在mac上“curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused”-安装NVM
2.查询一下 raw.githubusercontent.com对应的IP 地址
在mac上“curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused”-安装NVM
3.替换系统的host文件
在mac上“curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused”-安装NVM
在mac上“curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused”-安装NVM
4. 写上: 199.232.68.133 raw.githubusercontent.com
在mac上“curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused”-安装NVM
5.OK,大功告成!!!!!!!!!!
在mac上“curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused”-安装NVM
6.安装nvm

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"

在mac上“curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused”-安装NVM

6.复制 这行代码:

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads

在mac上“curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused”-安装NVM
7.看看是否成功了
在mac上“curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused”-安装NVM