安装HomeBrew

2021-03-15  本文已影响0人  守护地中海的花

难受 想哭😿 为了解决某个东西 发现homebrew特别难搞

查看你的mac是否安装了homebrew

brew -v
-bash: brew: command not found
查看版本:brew -v
安装软件:brew install 软件名
搜索软件:brew search 软件名
卸载软件:brew uninstall 软件名
更新所有软件:brew update
更新具体软件:brew upgrade 软件名
显示已安装软件:brew list
查看哪些已安装的程序需要更新: brew outdated
显示包依赖:brew reps
显示帮助:brew help

安装

bash /Users/mac/Desktop/brew_install.sh 

执行结果

macpro15:~ mac$ bash /Users/mac/Desktop/brew_install.sh 
Password:
==> This script will install:
/usr/local/bin/brew
/usr/local/share/doc/homebrew
/usr/local/share/man/man1/brew.1
/usr/local/share/zsh/site-functions/_brew
/usr/local/etc/bash_completion.d/brew
/usr/local/Homebrew

Press RETURN to continue or any other key to abort
==> /usr/bin/sudo /usr/sbin/chown -R mac:admin /usr/local/Homebrew
==> Downloading and installing Homebrew...
remote: Enumerating objects: 44, done.
remote: Counting objects: 100% (44/44), done.
remote: Compressing objects: 100% (44/44), done.
error: RPC failed; curl 56 LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 54
fatal: the remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
Failed during: git fetch --force origin

之间看我下面的解决方案把

"https://github.com/Homebrew/brew"
"https://github.com/Homebrew/homebrew-core"

替换成

"https://mirrors.ustc.edu.cn/brew.git"
"https://mirrors.ustc.edu.cn/homebrew-core.git"

执行 一定要关闭vpn 不然太慢了而且会失败 、关闭vpn、关闭vpn、关闭vpn、关闭vpn、关闭vpn、关闭vpn

bash /Users/mac/Desktop/brew_install.sh 
image.png
image.png
上一篇 下一篇

猜你喜欢

热点阅读