mac 安装homebrew

2024-05-07 12:36
文章标签 安装 mac homebrew

本文主要是介绍mac 安装homebrew,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

brew安装

/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"

brew相关指令

brew help查看帮助

brew -v查看版本

brew update更新brew

brew install <包>安装

brew uninstall <包名>卸载

brew outdated查询可更新的包

brew upgrade 全部更新包

brew upgrade 包名 指定包更新包

brew cleanup清理旧版本

brew info 包名查看包信息

brew list查看安装列表

brew search <包名>查询可用包

安装过程

pandeAir:~ pan$ /bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
git version 2.21.0开始执行Homebrew自动安装程序 [cunkai.wang@foxmail.com] ['2024-05-07 10:46:07']['14.3']https://zhuanlan.zhihu.com/p/111014448 请选择下列一个 数字编号 后回车
(这里只是下载brew,随意选。国内下载源有5种稍后让你选择配置)1、通过清华大学下载brew
2、通过Gitee下载brew
3、!我已经安装brew,直接带我去配置国内下载源请输入序号: 你选择了清华大学brew本体下载源Mac os设置开机密码方法:(设置开机密码:在左上角苹果图标->系统偏好设置->用户与群组->更改密码)(如果提示This incident will be reported. 在用户与群组中查看是否管理员) 
请输入开机密码,输入过程不显示,输入完后回车
Password:
已获取权限==> 安装过程开始调用Brew官方安装脚本,提示会变成英文,看不懂的复制到在线翻译。如果下载速度慢可以ctrl+c或control+c重新运行脚本选择下载源->  !!!!是否删除之前本机安装的Brew(是Y  否N) 我没有检测本机是否安装brew,选哪个都会继续运行  (Y/N):   Y--> 脚本开始执行---备份要删除的/usr/local/Homebrew到系统桌面,后续可把桌面的文件删除....
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 备份完成---备份要删除的/Library/Caches/Homebrew到系统桌面,后续可把桌面的文件删除....---/Library/Caches/Homebrew 备份完成---备份要删除的/Library/Logs/Homebrew到系统桌面,后续可把桌面的文件删除....---/Library/Logs/Homebrew 备份完成
未发现Git代理(属于正常状态)开始  进入brew官方安装脚本  开始下载官方install.sh文件,当前目录是: /Users/pan
Cloning into 'brew-install-ck'...
remote: Enumerating objects: 16, done.
remote: Counting objects: 100% (16/16), done.
remote: Compressing objects: 100% (16/16), done.
remote: Total 16 (delta 0), reused 8 (delta 0), pack-reused 0
Unpacking objects: 100% (16/16), done.
start_clone_brew:[:73: integer expression expected: 704 / 2
==> Checking for `sudo` access (which may request your 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
==> The following existing directories will be made writable by user only:
/usr/local/share/zsh
/usr/local/share/zsh/site-functions
==> The Xcode Command Line Tools will be installed.Press RETURN/ENTER 现在是brew官方安装提示,它需要你按回车键开始 other key to abort:
==> /usr/bin/sudo /bin/chmod u+rwx /usr/local/share/zsh /usr/local/share/zsh/site-functions
==> /usr/bin/sudo /bin/chmod go-w /usr/local/share/zsh /usr/local/share/zsh/site-functions
==> /usr/bin/sudo /bin/mkdir -p /usr/local/Homebrew
==> /usr/bin/sudo /usr/sbin/chown -R pan:admin /usr/local/Homebrew
==> /usr/bin/sudo /bin/mkdir -p /Users/pan/Library/Caches/Homebrew
==> /usr/bin/sudo /bin/chmod g+rwx /Users/pan/Library/Caches/Homebrew
==> /usr/bin/sudo /usr/sbin/chown -R pan /Users/pan/Library/Caches/Homebrew
==> Searching online for the Command Line Tools
==> /usr/bin/sudo /usr/bin/touch /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress
==> Installing Command Line Tools for Xcode-15.3
==> /usr/bin/sudo /usr/sbin/softwareupdate -i Command\ Line\ Tools\ for\ Xcode-15.3
Software Update ToolFinding available softwareDownloading Command Line Tools for Xcode
Downloaded Command Line Tools for Xcode
Installing Command Line Tools for Xcode            
Done with Command Line Tools for Xcode
Done.
==> /usr/bin/sudo /usr/bin/xcode-select --switch /Library/Developer/CommandLineTools
Password:
==> /usr/bin/sudo /bin/rm -f /tmp/.com.apple.dt.CommandLineTools.installondemand.in-progress
==> Downloading and installing Homebrew...
remote: Enumerating objects: 268139, done.
remote: Counting objects: 100% (80402/80402), done.
remote: Compressing objects: 100% (9413/9413), done.
Receiving objects: 100% (268139/268139), 76.64 MiB | 147.00 KiB/s, done.
remote: Total 268139 (delta 79114), reused 71033 (delta 70989), pack-reused 187737
Resolving deltas: 100% (195904/195904), done.
From https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew* [new branch]            allowed-taps               -> origin/allowed-taps* [new branch]            bundle-install-euid        -> origin/bundle-install-euid* [new branch]            dependabot/bundler/Library/Homebrew/json_schemer-2.2.1 -> origin/dependabot/bundler/Library/Homebrew/json_schemer-2.2.1* [new branch]            deprecate_disable_remove   -> origin/deprecate_disable_remove* [new branch]            deps-filters               -> origin/deps-filters* [new branch]            intel-runner-tag           -> origin/intel-runner-tag* [new branch]            load-internal-cask-json-v3 -> origin/load-internal-cask-json-v3* [new branch]            long-build-queue           -> origin/long-build-queue* [new branch]            master                     -> origin/master* [new branch]            neon-proxy-5201            -> origin/neon-proxy-5201* [new branch]            tap-shard-fonts            -> origin/tap-shard-fonts* [new branch]            tapioca-patch              -> origin/tapioca-patch* [new tag]               0.1                        -> 0.1* [new tag]               0.2                        -> 0.2* [new tag]               0.3                        -> 0.3* [new tag]               0.4                        -> 0.4* [new tag]               0.5                        -> 0.5* [new tag]               0.6                        -> 0.6* [new tag]               0.7                        -> 0.7* [new tag]               0.7.1                      -> 0.7.1* [new tag]               0.8                        -> 0.8* [new tag]               0.8.1                      -> 0.8.1* [new tag]               0.9                        -> 0.9* [new tag]               0.9.1                      -> 0.9.1* [new tag]               0.9.2                      -> 0.9.2* [new tag]               0.9.3                      -> 0.9.3* [new tag]               0.9.4                      -> 0.9.4* [new tag]               0.9.5                      -> 0.9.5* [new tag]               0.9.8                      -> 0.9.8* [new tag]               0.9.9                      -> 0.9.9* [new tag]               1.0.0                      -> 1.0.0* [new tag]               1.0.1                      -> 1.0.1* [new tag]               1.0.2                      -> 1.0.2* [new tag]               1.0.3                      -> 1.0.3* [new tag]               1.0.4                      -> 1.0.4* [new tag]               1.0.5                      -> 1.0.5* [new tag]               1.0.6                      -> 1.0.6* [new tag]               1.0.7                      -> 1.0.7* [new tag]               1.0.8                      -> 1.0.8* [new tag]               1.0.9                      -> 1.0.9* [new tag]               1.1.0                      -> 1.1.0* [new tag]               1.1.1                      -> 1.1.1* [new tag]               1.1.10                     -> 1.1.10* [new tag]               1.1.11                     -> 1.1.11* [new tag]               1.1.12                     -> 1.1.12* [new tag]               1.1.13                     -> 1.1.13* [new tag]               1.1.2                      -> 1.1.2* [new tag]               1.1.3                      -> 1.1.3* [new tag]               1.1.4                      -> 1.1.4* [new tag]               1.1.5                      -> 1.1.5* [new tag]               1.1.6                      -> 1.1.6* [new tag]               1.1.7                      -> 1.1.7* [new tag]               1.1.8                      -> 1.1.8* [new tag]               1.1.9                      -> 1.1.9* [new tag]               1.2.0                      -> 1.2.0* [new tag]               1.2.1                      -> 1.2.1* [new tag]               1.2.2                      -> 1.2.2* [new tag]               1.2.3                      -> 1.2.3* [new tag]               1.2.4                      -> 1.2.4* [new tag]               1.2.5                      -> 1.2.5* [new tag]               1.2.6                      -> 1.2.6* [new tag]               1.3.0                      -> 1.3.0* [new tag]               1.3.1                      -> 1.3.1* [new tag]               1.3.2                      -> 1.3.2* [new tag]               1.3.3                      -> 1.3.3* [new tag]               1.3.4                      -> 1.3.4* [new tag]               1.3.5                      -> 1.3.5* [new tag]               1.3.6                      -> 1.3.6* [new tag]               1.3.7                      -> 1.3.7* [new tag]               1.3.8                      -> 1.3.8* [new tag]               1.3.9                      -> 1.3.9* [new tag]               1.4.0                      -> 1.4.0* [new tag]               1.4.1                      -> 1.4.1* [new tag]               1.4.2                      -> 1.4.2* [new tag]               1.4.3                      -> 1.4.3* [new tag]               1.5.0                      -> 1.5.0* [new tag]               1.5.1                      -> 1.5.1* [new tag]               1.5.10                     -> 1.5.10* [new tag]               1.5.11                     -> 1.5.11* [new tag]               1.5.12                     -> 1.5.12* [new tag]               1.5.13                     -> 1.5.13* [new tag]               1.5.14                     -> 1.5.14* [new tag]               1.5.2                      -> 1.5.2* [new tag]               1.5.3                      -> 1.5.3* [new tag]               1.5.4                      -> 1.5.4* [new tag]               1.5.5                      -> 1.5.5* [new tag]               1.5.6                      -> 1.5.6* [new tag]               1.5.7                      -> 1.5.7* [new tag]               1.5.8                      -> 1.5.8* [new tag]               1.5.9                      -> 1.5.9* [new tag]               1.6.0                      -> 1.6.0* [new tag]               1.6.1                      -> 1.6.1* [new tag]               1.6.10                     -> 1.6.10* [new tag]               1.6.11                     -> 1.6.11* [new tag]               1.6.12                     -> 1.6.12* [new tag]               1.6.13                     -> 1.6.13* [new tag]               1.6.14                     -> 1.6.14* [new tag]               1.6.15                     -> 1.6.15* [new tag]               1.6.16                     -> 1.6.16* [new tag]               1.6.17                     -> 1.6.17* [new tag]               1.6.2                      -> 1.6.2* [new tag]               1.6.3                      -> 1.6.3* [new tag]               1.6.4                      -> 1.6.4* [new tag]               1.6.5                      -> 1.6.5* [new tag]               1.6.6                      -> 1.6.6* [new tag]               1.6.7                      -> 1.6.7* [new tag]               1.6.8                      -> 1.6.8* [new tag]               1.6.9                      -> 1.6.9* [new tag]               1.7.0                      -> 1.7.0* [new tag]               1.7.1                      -> 1.7.1* [new tag]               1.7.2                      -> 1.7.2* [new tag]               1.7.3                      -> 1.7.3* [new tag]               1.7.4                      -> 1.7.4* [new tag]               1.7.5                      -> 1.7.5* [new tag]               1.7.6                      -> 1.7.6* [new tag]               1.7.7                      -> 1.7.7* [new tag]               1.8.0                      -> 1.8.0* [new tag]               1.8.1                      -> 1.8.1* [new tag]               1.8.2                      -> 1.8.2* [new tag]               1.8.3                      -> 1.8.3* [new tag]               1.8.4                      -> 1.8.4* [new tag]               1.8.5                      -> 1.8.5* [new tag]               1.8.6                      -> 1.8.6* [new tag]               1.9.0                      -> 1.9.0* [new tag]               1.9.1                      -> 1.9.1* [new tag]               1.9.2                      -> 1.9.2* [new tag]               1.9.3                      -> 1.9.3* [new tag]               2.0.0                      -> 2.0.0* [new tag]               2.0.1                      -> 2.0.1* [new tag]               2.0.2                      -> 2.0.2* [new tag]               2.0.3                      -> 2.0.3* [new tag]               2.0.4                      -> 2.0.4* [new tag]               2.0.5                      -> 2.0.5* [new tag]               2.0.6                      -> 2.0.6* [new tag]               2.1.0                      -> 2.1.0* [new tag]               2.1.1                      -> 2.1.1* [new tag]               2.1.10                     -> 2.1.10* [new tag]               2.1.11                     -> 2.1.11* [new tag]               2.1.12                     -> 2.1.12* [new tag]               2.1.13                     -> 2.1.13* [new tag]               2.1.14                     -> 2.1.14* [new tag]               2.1.15                     -> 2.1.15* [new tag]               2.1.16                     -> 2.1.16* [new tag]               2.1.2                      -> 2.1.2* [new tag]               2.1.3                      -> 2.1.3* [new tag]               2.1.4                      -> 2.1.4* [new tag]               2.1.5                      -> 2.1.5* [new tag]               2.1.6                      -> 2.1.6* [new tag]               2.1.7                      -> 2.1.7* [new tag]               2.1.8                      -> 2.1.8* [new tag]               2.1.9                      -> 2.1.9* [new tag]               2.2.0                      -> 2.2.0* [new tag]               2.2.1                      -> 2.2.1* [new tag]               2.2.10                     -> 2.2.10* [new tag]               2.2.11                     -> 2.2.11* [new tag]               2.2.12                     -> 2.2.12* [new tag]               2.2.13                     -> 2.2.13* [new tag]               2.2.14                     -> 2.2.14* [new tag]               2.2.15                     -> 2.2.15* [new tag]               2.2.16                     -> 2.2.16* [new tag]               2.2.17                     -> 2.2.17* [new tag]               2.2.2                      -> 2.2.2* [new tag]               2.2.3                      -> 2.2.3* [new tag]               2.2.4                      -> 2.2.4* [new tag]               2.2.5                      -> 2.2.5* [new tag]               2.2.6                      -> 2.2.6* [new tag]               2.2.7                      -> 2.2.7* [new tag]               2.2.8                      -> 2.2.8* [new tag]               2.2.9                      -> 2.2.9* [new tag]               2.3.0                      -> 2.3.0* [new tag]               2.4.0                      -> 2.4.0* [new tag]               2.4.1                      -> 2.4.1* [new tag]               2.4.10                     -> 2.4.10* [new tag]               2.4.11                     -> 2.4.11* [new tag]               2.4.12                     -> 2.4.12* [new tag]               2.4.13                     -> 2.4.13* [new tag]               2.4.14                     -> 2.4.14* [new tag]               2.4.15                     -> 2.4.15* [new tag]               2.4.16                     -> 2.4.16* [new tag]               2.4.2                      -> 2.4.2* [new tag]               2.4.3                      -> 2.4.3* [new tag]               2.4.4                      -> 2.4.4* [new tag]               2.4.5                      -> 2.4.5* [new tag]               2.4.6                      -> 2.4.6* [new tag]               2.4.7                      -> 2.4.7* [new tag]               2.4.8                      -> 2.4.8* [new tag]               2.4.9                      -> 2.4.9* [new tag]               2.5.0                      -> 2.5.0* [new tag]               2.5.1                      -> 2.5.1* [new tag]               2.5.10                     -> 2.5.10* [new tag]               2.5.11                     -> 2.5.11* [new tag]               2.5.12                     -> 2.5.12* [new tag]               2.5.2                      -> 2.5.2* [new tag]               2.5.3                      -> 2.5.3* [new tag]               2.5.4                      -> 2.5.4* [new tag]               2.5.5                      -> 2.5.5* [new tag]               2.5.6                      -> 2.5.6* [new tag]               2.5.7                      -> 2.5.7* [new tag]               2.5.8                      -> 2.5.8* [new tag]               2.5.9                      -> 2.5.9* [new tag]               2.6.0                      -> 2.6.0* [new tag]               2.6.1                      -> 2.6.1* [new tag]               2.6.2                      -> 2.6.2* [new tag]               2.7.0                      -> 2.7.0* [new tag]               2.7.1                      -> 2.7.1* [new tag]               2.7.2                      -> 2.7.2* [new tag]               2.7.3                      -> 2.7.3* [new tag]               2.7.4                      -> 2.7.4* [new tag]               2.7.5                      -> 2.7.5* [new tag]               2.7.6                      -> 2.7.6* [new tag]               2.7.7                      -> 2.7.7* [new tag]               3.0.0                      -> 3.0.0* [new tag]               3.0.1                      -> 3.0.1* [new tag]               3.0.10                     -> 3.0.10* [new tag]               3.0.11                     -> 3.0.11* [new tag]               3.0.2                      -> 3.0.2* [new tag]               3.0.3                      -> 3.0.3* [new tag]               3.0.4                      -> 3.0.4* [new tag]               3.0.5                      -> 3.0.5* [new tag]               3.0.6                      -> 3.0.6* [new tag]               3.0.7                      -> 3.0.7* [new tag]               3.0.8                      -> 3.0.8* [new tag]               3.0.9                      -> 3.0.9* [new tag]               3.1.0                      -> 3.1.0* [new tag]               3.1.1                      -> 3.1.1* [new tag]               3.1.10                     -> 3.1.10* [new tag]               3.1.11                     -> 3.1.11* [new tag]               3.1.12                     -> 3.1.12* [new tag]               3.1.2                      -> 3.1.2* [new tag]               3.1.3                      -> 3.1.3* [new tag]               3.1.4                      -> 3.1.4* [new tag]               3.1.5                      -> 3.1.5* [new tag]               3.1.6                      -> 3.1.6* [new tag]               3.1.7                      -> 3.1.7* [new tag]               3.1.8                      -> 3.1.8* [new tag]               3.1.9                      -> 3.1.9* [new tag]               3.2.0                      -> 3.2.0* [new tag]               3.2.1                      -> 3.2.1* [new tag]               3.2.10                     -> 3.2.10* [new tag]               3.2.11                     -> 3.2.11* [new tag]               3.2.12                     -> 3.2.12* [new tag]               3.2.13                     -> 3.2.13* [new tag]               3.2.14                     -> 3.2.14* [new tag]               3.2.15                     -> 3.2.15* [new tag]               3.2.16                     -> 3.2.16* [new tag]               3.2.17                     -> 3.2.17* [new tag]               3.2.2                      -> 3.2.2* [new tag]               3.2.3                      -> 3.2.3* [new tag]               3.2.4                      -> 3.2.4* [new tag]               3.2.5                      -> 3.2.5* [new tag]               3.2.6                      -> 3.2.6* [new tag]               3.2.7                      -> 3.2.7* [new tag]               3.2.8                      -> 3.2.8* [new tag]               3.2.9                      -> 3.2.9* [new tag]               3.3.0                      -> 3.3.0* [new tag]               3.3.1                      -> 3.3.1* [new tag]               3.3.10                     -> 3.3.10* [new tag]               3.3.11                     -> 3.3.11* [new tag]               3.3.12                     -> 3.3.12* [new tag]               3.3.13                     -> 3.3.13* [new tag]               3.3.14                     -> 3.3.14* [new tag]               3.3.15                     -> 3.3.15* [new tag]               3.3.16                     -> 3.3.16* [new tag]               3.3.2                      -> 3.3.2* [new tag]               3.3.3                      -> 3.3.3* [new tag]               3.3.4                      -> 3.3.4* [new tag]               3.3.5                      -> 3.3.5* [new tag]               3.3.6                      -> 3.3.6* [new tag]               3.3.7                      -> 3.3.7* [new tag]               3.3.8                      -> 3.3.8* [new tag]               3.3.9                      -> 3.3.9* [new tag]               3.4.0                      -> 3.4.0* [new tag]               3.4.1                      -> 3.4.1* [new tag]               3.4.10                     -> 3.4.10* [new tag]               3.4.11                     -> 3.4.11* [new tag]               3.4.2                      -> 3.4.2* [new tag]               3.4.3                      -> 3.4.3* [new tag]               3.4.4                      -> 3.4.4* [new tag]               3.4.5                      -> 3.4.5* [new tag]               3.4.6                      -> 3.4.6* [new tag]               3.4.7                      -> 3.4.7* [new tag]               3.4.8                      -> 3.4.8* [new tag]               3.4.9                      -> 3.4.9* [new tag]               3.5.0                      -> 3.5.0* [new tag]               3.5.1                      -> 3.5.1* [new tag]               3.5.10                     -> 3.5.10* [new tag]               3.5.2                      -> 3.5.2* [new tag]               3.5.3                      -> 3.5.3* [new tag]               3.5.4                      -> 3.5.4* [new tag]               3.5.5                      -> 3.5.5* [new tag]               3.5.6                      -> 3.5.6* [new tag]               3.5.7                      -> 3.5.7* [new tag]               3.5.8                      -> 3.5.8* [new tag]               3.5.9                      -> 3.5.9* [new tag]               3.6.0                      -> 3.6.0* [new tag]               3.6.1                      -> 3.6.1* [new tag]               3.6.10                     -> 3.6.10* [new tag]               3.6.11                     -> 3.6.11* [new tag]               3.6.12                     -> 3.6.12* [new tag]               3.6.13                     -> 3.6.13* [new tag]               3.6.14                     -> 3.6.14* [new tag]               3.6.15                     -> 3.6.15* [new tag]               3.6.16                     -> 3.6.16* [new tag]               3.6.17                     -> 3.6.17* [new tag]               3.6.18                     -> 3.6.18* [new tag]               3.6.19                     -> 3.6.19* [new tag]               3.6.2                      -> 3.6.2* [new tag]               3.6.20                     -> 3.6.20* [new tag]               3.6.21                     -> 3.6.21* [new tag]               3.6.3                      -> 3.6.3* [new tag]               3.6.4                      -> 3.6.4* [new tag]               3.6.5                      -> 3.6.5* [new tag]               3.6.6                      -> 3.6.6* [new tag]               3.6.7                      -> 3.6.7* [new tag]               3.6.8                      -> 3.6.8* [new tag]               3.6.9                      -> 3.6.9* [new tag]               4.0.0                      -> 4.0.0* [new tag]               4.0.1                      -> 4.0.1* [new tag]               4.0.10                     -> 4.0.10* [new tag]               4.0.11                     -> 4.0.11* [new tag]               4.0.12                     -> 4.0.12* [new tag]               4.0.13                     -> 4.0.13* [new tag]               4.0.14                     -> 4.0.14* [new tag]               4.0.15                     -> 4.0.15* [new tag]               4.0.16                     -> 4.0.16* [new tag]               4.0.17                     -> 4.0.17* [new tag]               4.0.18                     -> 4.0.18* [new tag]               4.0.19                     -> 4.0.19* [new tag]               4.0.2                      -> 4.0.2* [new tag]               4.0.20                     -> 4.0.20* [new tag]               4.0.21                     -> 4.0.21* [new tag]               4.0.22                     -> 4.0.22* [new tag]               4.0.23                     -> 4.0.23* [new tag]               4.0.24                     -> 4.0.24* [new tag]               4.0.25                     -> 4.0.25* [new tag]               4.0.26                     -> 4.0.26* [new tag]               4.0.27                     -> 4.0.27* [new tag]               4.0.28                     -> 4.0.28* [new tag]               4.0.3                      -> 4.0.3* [new tag]               4.0.4                      -> 4.0.4* [new tag]               4.0.5                      -> 4.0.5* [new tag]               4.0.6                      -> 4.0.6* [new tag]               4.0.7                      -> 4.0.7* [new tag]               4.0.8                      -> 4.0.8* [new tag]               4.0.9                      -> 4.0.9* [new tag]               4.1.0                      -> 4.1.0* [new tag]               4.1.1                      -> 4.1.1* [new tag]               4.1.10                     -> 4.1.10* [new tag]               4.1.11                     -> 4.1.11* [new tag]               4.1.12                     -> 4.1.12* [new tag]               4.1.13                     -> 4.1.13* [new tag]               4.1.14                     -> 4.1.14* [new tag]               4.1.15                     -> 4.1.15* [new tag]               4.1.16                     -> 4.1.16* [new tag]               4.1.17                     -> 4.1.17* [new tag]               4.1.18                     -> 4.1.18* [new tag]               4.1.19                     -> 4.1.19* [new tag]               4.1.2                      -> 4.1.2* [new tag]               4.1.20                     -> 4.1.20* [new tag]               4.1.21                     -> 4.1.21* [new tag]               4.1.22                     -> 4.1.22* [new tag]               4.1.23                     -> 4.1.23* [new tag]               4.1.24                     -> 4.1.24* [new tag]               4.1.25                     -> 4.1.25* [new tag]               4.1.3                      -> 4.1.3* [new tag]               4.1.4                      -> 4.1.4* [new tag]               4.1.5                      -> 4.1.5* [new tag]               4.1.6                      -> 4.1.6* [new tag]               4.1.7                      -> 4.1.7* [new tag]               4.1.8                      -> 4.1.8* [new tag]               4.2.0                      -> 4.2.0* [new tag]               4.2.1                      -> 4.2.1* [new tag]               4.2.10                     -> 4.2.10* [new tag]               4.2.11                     -> 4.2.11* [new tag]               4.2.12                     -> 4.2.12* [new tag]               4.2.13                     -> 4.2.13* [new tag]               4.2.15                     -> 4.2.15* [new tag]               4.2.16                     -> 4.2.16* [new tag]               4.2.17                     -> 4.2.17* [new tag]               4.2.18                     -> 4.2.18* [new tag]               4.2.19                     -> 4.2.19* [new tag]               4.2.2                      -> 4.2.2* [new tag]               4.2.20                     -> 4.2.20* [new tag]               4.2.21                     -> 4.2.21* [new tag]               4.2.3                      -> 4.2.3* [new tag]               4.2.4                      -> 4.2.4* [new tag]               4.2.5                      -> 4.2.5* [new tag]               4.2.6                      -> 4.2.6* [new tag]               4.2.7                      -> 4.2.7* [new tag]               4.2.8                      -> 4.2.8* [new tag]               4.2.9                      -> 4.2.9
remote: Enumerating objects: 33, done.
remote: Counting objects: 100% (20/20), done.
remote: Total 33 (delta 20), reused 20 (delta 20), pack-reused 13
Unpacking objects: 100% (33/33), 5.95 KiB | 132.00 KiB/s, done.
From https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew* [new tag]               4.0.29     -> 4.0.29* [new tag]               4.1.9      -> 4.1.9* [new tag]               4.2.14     -> 4.2.14
Switched to a new branch 'stable'
==> Fetching /usr/local/Homebrew...==> Resetting /usr/local/Homebrew...
Reset branch 'stable'==> Installation successful!==> 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 data has been sent yet (nor will any be during this install run).==> Homebrew is run entirely by unpaid volunteers. Please consider donating:https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew#donations==> Next steps:
- Run these two commands in your terminal to add Homebrew to your PATH:(echo; echo 'eval "$(/usr/local/bin/brew shellenv)"') >> /Users/pan/.bash_profileeval "$(/usr/local/bin/brew shellenv)"
- Run brew help to get started
- Further documentation:https://docs.brew.sh此步骤成功
Password:完成  退出brew官方安装脚本  完成==> 配置国内镜像源HOMEBREW BOTTLE     
此处如果显示Password表示需要再次输入开机密码,输入完后回车
有些电脑xcode和git混乱,再运行一次,此处如果有error正常。
xcode-select: note: Command line tools are already installed. Use "Software Update" in System Settings or the softwareupdate command line interface to install updatesHomebrew已经安装成功,接下来配置国内软件下载源。请选择今后brew install的时候访问那个国内镜像,例如阿里巴巴,输入5回车。1、中科大国内源(推荐)
2、清华大学国内源
3、上海交通大学国内源
4、腾讯国内源
5、阿里巴巴国内源(推荐) 
请输入序号: 5你选择了阿里巴巴国内源环境变量写入->/Users/pan/.bash_profile此步骤成功==> 安装完成,brew版本Homebrew 4.2.21
Homebrew前期配置成功
==> Updating Homebrew...
==> Downloading https://mirrors.aliyun.com/homebrew/homebrew-bottles/bottles-portable-ruby/portable-ruby-3.1.4.el_capitan.bottle.tar.gz
################################################################################################# 100.0%
==> Pouring portable-ruby-3.1.4.el_capitan.bottle.tar.gz
==> Homebrew collects anonymous analytics.
Read the analytics documentation (and how to opt-out) here:https://docs.brew.sh/Analytics
No analytics have been recorded yet (nor will be during this `brew` run).==> Homebrew is run entirely by unpaid volunteers. Please consider donating:https://github.com/Homebrew/brew#donationsAlready up-to-date.Homebrew自动安装程序运行完成国内地址已经配置完成之前步骤选了删除本机brew的话,桌面多出一个Old_Homebrew文件夹,可以删除。初步介绍几个brew命令
查看版本:brew -v  更新brew版本:brew update
查找:brew search python(其中python替换为要查找的关键字)
安装:brew install python  安装完成输入 python3 -h 查看
本地软件库列表:brew ls欢迎右键点击下方地址-打开链接 点个赞吧https://zhuanlan.zhihu.com/p/111014448 如果遇到问题可以右键下面地址查看常见错误解决办法https://gitee.com/cunkai/HomebrewCN/blob/master/error.mdbrew官方地址:https://brew.sh/zh-cn/安装成功 但还需要重启终端 或者 运行 source /Users/pan/.bash_profile   否则国内地址无法生效

这篇关于mac 安装homebrew的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/967367

相关文章

Linux系统中卸载与安装JDK的详细教程

《Linux系统中卸载与安装JDK的详细教程》本文详细介绍了如何在Linux系统中通过Xshell和Xftp工具连接与传输文件,然后进行JDK的安装与卸载,安装步骤包括连接Linux、传输JDK安装包... 目录1、卸载1.1 linux删除自带的JDK1.2 Linux上卸载自己安装的JDK2、安装2.1

Linux卸载自带jdk并安装新jdk版本的图文教程

《Linux卸载自带jdk并安装新jdk版本的图文教程》在Linux系统中,有时需要卸载预装的OpenJDK并安装特定版本的JDK,例如JDK1.8,所以本文给大家详细介绍了Linux卸载自带jdk并... 目录Ⅰ、卸载自带jdkⅡ、安装新版jdkⅠ、卸载自带jdk1、输入命令查看旧jdkrpm -qa

MySQL Workbench 安装教程(保姆级)

《MySQLWorkbench安装教程(保姆级)》MySQLWorkbench是一款强大的数据库设计和管理工具,本文主要介绍了MySQLWorkbench安装教程,文中通过图文介绍的非常详细,对大... 目录前言:详细步骤:一、检查安装的数据库版本二、在官网下载对应的mysql Workbench版本,要是

Linux安装MySQL的教程

《Linux安装MySQL的教程》:本文主要介绍Linux安装MySQL的教程,具有很好的参考价值,希望对大家有所帮助,如有错误或未考虑完全的地方,望不吝赐教... 目录linux安装mysql1.Mysql官网2.我的存放路径3.解压mysql文件到当前目录4.重命名一下5.创建mysql用户组和用户并修

pip无法安装osgeo失败的问题解决

《pip无法安装osgeo失败的问题解决》本文主要介绍了pip无法安装osgeo失败的问题解决,文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一... 进入官方提供的扩展包下载网站寻找版本适配的whl文件注意:要选择cp(python版本)和你py

Android App安装列表获取方法(实践方案)

《AndroidApp安装列表获取方法(实践方案)》文章介绍了Android11及以上版本获取应用列表的方案调整,包括权限配置、白名单配置和action配置三种方式,并提供了相应的Java和Kotl... 目录前言实现方案         方案概述一、 androidManifest 三种配置方式

Python解析器安装指南分享(Mac/Windows/Linux)

《Python解析器安装指南分享(Mac/Windows/Linux)》:本文主要介绍Python解析器安装指南(Mac/Windows/Linux),具有很好的参考价值,希望对大家有所帮助,如有... 目NMNkN录1js. 安装包下载1.1 python 下载官网2.核心安装方式3. MACOS 系统安

Pycharm安装报错:Cannot detect a launch configuration解决办法

《Pycharm安装报错:Cannotdetectalaunchconfiguration解决办法》本文主要介绍了Pycharm安装报错:Cannotdetectalaunchconfigur... 本文主要介绍了Pycharm安装报错:Cannot detect a launch configuratio

pytorch+torchvision+python版本对应及环境安装

《pytorch+torchvision+python版本对应及环境安装》本文主要介绍了pytorch+torchvision+python版本对应及环境安装,安装过程中需要注意Numpy版本的降级,... 目录一、版本对应二、安装命令(pip)1. 版本2. 安装全过程3. 命令相关解释参考文章一、版本对

Windows系统下如何查找JDK的安装路径

《Windows系统下如何查找JDK的安装路径》:本文主要介绍Windows系统下如何查找JDK的安装路径,文中介绍了三种方法,分别是通过命令行检查、使用verbose选项查找jre目录、以及查看... 目录一、确认是否安装了JDK二、查找路径三、另外一种方式如果很久之前安装了JDK,或者在别人的电脑上,想