Mac ~ % /bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
开始执行Brew自动安装程序
[cunkai.wang@foxmail.com]
[2020-08-18 22:20:55][10.15]
https://zhuanlan.zhihu.com/p/111014448
请选择一个下载镜像,例如中科大,输入1回车。
源有时候不稳定,如果git克隆报错重新运行脚本选择源。cask非必须,有部分人需要。
1、中科大下载源 2、清华大学下载源 3、北京外国语大学下载源 4、腾讯下载源(不显示下载进度) 5、阿里巴巴下载源(缺少cask源)
请输入序号: 3
北京外国语大学下载源
!!!此脚本将要删除之前的brew(包括它下载的软件),请自行备份。
->是否现在开始执行脚本(N/Y)Y
--> 脚本开始执行
==> 通过命令删除之前的brew、创建一个新的Homebrew文件夹
(设置开机密码:在左上角苹果图标->系统偏好设置->"用户与群组"->更改密码)
(如果提示This incident will be reported. 在"用户与群组"中查看是否管理员)
请输入开机密码,输入过程不显示,输入完后回车
Password:
开始执行
---备份要删除的文件夹到系统桌面....
cp: /usr/local/Homebrew/Library/Homebrew/os/mac/pkgconfig/fuse/osxfuse.pc: No such file or directory
cp: /usr/local/Homebrew/Library/Homebrew/os/mac/pkgconfig/fuse/fuse.pc: No such file or directory
---/usr/local/Homebrew 备份完成
-> 创建文件夹 /usr/local/Homebrew
此步骤成功
---备份要删除的文件夹到系统桌面....
cp: /Users/mac/Library/Caches/Homebrew//Backup/bin/2to3: No such file or directory
cp: /Users/mac/Library/Caches/Homebrew//Backup/bin/python3: No such file or directory
cp: /Users/mac/Library/Caches/Homebrew//Backup/bin/idle3: No such file or directory
cp: /Users/mac/Library/Caches/Homebrew//Backup/bin/python3-config: No such file or directory
cp: /Users/mac/Library/Caches/Homebrew//Backup/bin/pydoc3: No such file or directory
---/Users/mac/Library/Caches/Homebrew/ 备份完成
---备份要删除的文件夹到系统桌面....
---/Users/mac/Library/Logs/Homebrew/ 备份完成
---备份要删除的文件夹到系统桌面....
---/usr/local/Caskroom 备份完成
-> 创建文件夹 /usr/local/Caskroom
此步骤成功
---备份要删除的文件夹到系统桌面....
---/usr/local/Cellar 备份完成
-> 创建文件夹 /usr/local/Cellar
此步骤成功
---备份要删除的文件夹到系统桌面....
cp: /usr/local/var/homebrew/linked/pkg-config: No such file or directory
cp: /usr/local/var/homebrew/linked/libtool: No such file or directory
cp: /usr/local/var/homebrew/linked/coreutils: No such file or directory
cp: /usr/local/var/homebrew/linked/gmp: No such file or directory
cp: /usr/local/var/homebrew/linked/pinentry: No such file or directory
cp: /usr/local/var/homebrew/linked/libidn2: No such file or directory
cp: /usr/local/var/homebrew/linked/libksba: No such file or directory
cp: /usr/local/var/homebrew/linked/nettle: No such file or directory
cp: /usr/local/var/homebrew/linked/gdbm: No such file or directory
cp: /usr/local/var/homebrew/linked/libunistring: No such file or directory
cp: /usr/local/var/homebrew/linked/libyaml: No such file or directory
cp: /usr/local/var/homebrew/linked/libassuan: No such file or directory
cp: /usr/local/var/homebrew/linked/libgpg-error: No such file or directory
cp: /usr/local/var/homebrew/linked/xz: No such file or directory
cp: /usr/local/var/homebrew/linked/libgcrypt: No such file or directory
cp: /usr/local/var/homebrew/linked/gettext: No such file or directory
cp: /usr/local/var/homebrew/linked/watchman: No such file or directory
cp: /usr/local/var/homebrew/linked/autoconf: No such file or directory
cp: /usr/local/var/homebrew/linked/libtasn1: No such file or directory
cp: /usr/local/var/homebrew/linked/libevent: No such file or directory
cp: /usr/local/var/homebrew/linked/pcre: No such file or directory
cp: /usr/local/var/homebrew/linked/node: No such file or directory
cp: /usr/local/var/homebrew/linked/unbound: No such file or directory
cp: /usr/local/var/homebrew/linked/libusb: No such file or directory
cp: /usr/local/var/homebrew/linked/python@3.8: No such file or directory
cp: /usr/local/var/homebrew/linked/gnupg: No such file or directory
cp: /usr/local/var/homebrew/linked/p11-kit: No such file or directory
cp: /usr/local/var/homebrew/linked/automake: No such file or directory
cp: /usr/local/var/homebrew/linked/gnutls: No such file or directory
cp: /usr/local/var/homebrew/linked/npth: No such file or directory
cp: /usr/local/var/homebrew/linked/adns: No such file or directory
cp: /usr/local/var/homebrew/linked/flow: No such file or directory
---/usr/local/var/homebrew 备份完成
-> 创建文件夹 /usr/local/var/homebrew
此步骤成功
-> 创建文件夹 /usr/local/var/homebrew/linked
此步骤成功
git version 2.24.3 (Apple Git-128)
下载速度觉得慢可以ctrl+c或control+c重新运行脚本选择下载源
==> 克隆Homebrew基本文件(32M+)
未发现Git代理(属于正常状态)
Cloning into '/usr/local/Homebrew'...
remote: Enumerating objects: 147498, done.
remote: Counting objects: 100% (147498/147498), done.
remote: Compressing objects: 100% (39649/39649), done.
remote: Total 147498 (delta 108637), reused 141799 (delta 104430)
Receiving objects: 100% (147498/147498), 36.36 MiB | 6.62 MiB/s, done.
Resolving deltas: 100% (108637/108637), done.
此步骤成功
==> 创建brew的替身
此步骤成功
==> 克隆Homebrew Core(224M+)
此处如果显示Password表示需要再次输入开机密码,输入完后回车
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core'...
remote: Enumerating objects: 780086, done.
remote: Counting objects: 100% (780086/780086), done.
remote: Compressing objects: 100% (280938/280938), done.
remote: Total 780086 (delta 515525), reused 750551 (delta 496075)
Receiving objects: 100% (780086/780086), 245.96 MiB | 6.57 MiB/s, done.
Resolving deltas: 100% (515525/515525), done.
此步骤成功
==> 克隆Homebrew Cask(248M+) 类似AppStore
此处如果显示Password表示需要再次输入开机密码,输入完后回车
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask'...
remote: Enumerating objects: 472394, done.
remote: Counting objects: 100% (472394/472394), done.
remote: Compressing objects: 100% (143897/143897), done.
remote: Total 472394 (delta 334592), reused 463693 (delta 327936)
Receiving objects: 100% (472394/472394), 205.57 MiB | 6.45 MiB/s, done.
Resolving deltas: 100% (334592/334592), done.
此步骤成功
==> 配置国内镜像源HOMEBREW BOTTLE
此步骤成功
==> 安装完成,brew版本
10.15
brew -v
Homebrew 2.4.12-24-g7241963-dirty
Homebrew/homebrew-core (git revision f76a37; last commit 2020-08-17)
Homebrew/homebrew-cask (git revision d5570; last commit 2020-08-18)
Brew前期配置成功
==> brew update
==> Homebrew has enabled anonymous aggregate formulae and cask analytics.
Read the analytics documentation (and how to opt-out) here:
https://docs.brew.sh/Analytics
No analytics have been recorded yet (or will be during this `brew` run).
==> Homebrew is run entirely by unpaid volunteers. Please consider donating:
https://github.com/Homebrew/brew#donations
Already up-to-date.
上一句如果提示Already up-to-date表示成功
Brew自动安装程序运行完成
国内地址已经配置完成
初步介绍几个brew命令
本地软件库列表:brew ls
查找软件:brew search google(其中google替换为要查找的软件关键字)
查看brew版本:brew -v 更新brew版本:brew update
现在可以输入命令open ~/.zshrc -e 或者 open ~/.bash_profile -e 整理一下重复的语句(运行 echo $SHELL 可以查看应该打开那一个文件修改)
https://zhuanlan.zhihu.com/p/111014448 欢迎来给点个赞
Mac ~ % brew -v
Homebrew 2.4.12-24-g7241963-dirty
Homebrew/homebrew-core (git revision f76a37; last commit 2020-08-17)
Homebrew/homebrew-cask (git revision d5570; last commit 2020-08-18)
网友评论