目前网上大多数都是这个方法,但是会出现无法连接的报错,raw.githubusercontent.com地址可能已经被污染,无法访问到。
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)";打开链接发现提示已经更换了下载路径,尝试一下仍然报443
#!/usr/bin/ruby STDERR.print <<EOS Warning: The Ruby Homebrew installer is now deprecated and has been rewritten in Bash. Please migrate to the following command: /bin/bash -c “ ( c u r l − f s S L h t t p s : / / r a w . g i t h u b u s e r c o n t e n t . c o m / H o m e b r e w / i n s t a l l / m a s t e r / i n s t a l l . s h ) " E O S K e r n e l . e x e c " / b i n / b a s h " , " − c " , ′ / b i n / b a s h − c " (curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)" EOS Kernel.exec "/bin/bash", "-c", '/bin/bash -c " (curl−fsSLhttps://raw.githubusercontent.com/Homebrew/install/master/install.sh)"EOSKernel.exec"/bin/bash","−c",′/bin/bash−c"(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)”’
最终想到第二个方法
打开链接 https://raw.githubusercontent.com/Homebrew/install/master/install.sh 打开后保存shell脚本到本地 命名 install 打开你的终端 输入
/bin/bash -c install文件路径提示输入密码,开始下载啦 注意 .sh 权限chmod 777 否则仍然无法执行~