编程的魅力
首页
分类
标签
归档
动态
关于我
hyuga
2020-10-26
1315
2020-10-27 15:34:22
原创
Homebrew安装失败怎么办
# 安装Homebrew报错 ``` hyuga@hyugadeMacBook-Pro ~ % /bin/bash -c "$(curl -fsSL http://raw.githubusercontent.com/Homebrew/install/master/install.sh)" curl: (7) Failed to connect to raw.githubusercontent.com port 443: Connection refused ``` # 配置hosts ``` # Homebrew ===================================== 199.232.68.133 raw.githubusercontent.com 199.232.68.133 user-images.githubusercontent.com 199.232.68.133 avatars2.githubusercontent.com 199.232.68.133 avatars1.githubusercontent.com # ============================================== ``` # 再执行脚本 `/bin/bash -c "$(curl -fsSL http://raw.githubusercontent.com/Homebrew/install/master/install.sh)"` ``` hyuga@hyugadeMacBook-Pro ~ % /bin/bash -c "$(curl -fsSL http://raw.githubusercontent.com/Homebrew/install/master/install.sh)" ==> You are using macOS 11.0. ==> We do not provide support for this pre-release version. This installation may not succeed. ...... ``` 好了,接下来就是耐心等待,官方下载比较慢。 也可以改用阿里云镜像,可自行百度。。。 # 其他错误 **Error: Another active Homebrew update process is already in progress.** ``` Error: Another active Homebrew update process is already in progress. Please wait for it to finish or terminate it to continue. Failed during: /usr/local/bin/brew update --force #这个错误很明显是已经有homebrew更新或者安装的进程了,不想再等待,可先删除再执行 #命令 rm -rf /usr/local/var/homebrew/locks/ ``` **error: Not a valid ref: refs/remotes/origin/master** ``` ==> Downloading and installing Homebrew... HEAD is now at 8175e404e Merge pull request #7942 from sjackman/bottle_tag error: Not a valid ref: refs/remotes/origin/master fatal: ambiguous argument 'refs/remotes/origin/master': unknown revision or path not in the working tree. #这个错误是由于多次下载,导致一些冲突,最简单粗暴的解决就是卸载重装 ``` # 卸载Homebrew 浏览器访问:[http://raw.githubusercontent.com/Homebrew/install/master/uninstall](http://raw.githubusercontent.com/Homebrew/install/master/uninstall) 终端执行:`vim /Users/hyuga/uninstall.rb` 贴入浏览器中响应的代码(如下),`:wq`保存 ``` #!/usr/bin/ruby STDERR.print <
标签:
macOS
评论
发布
留言
评论