一,通过命令行安装:
1,原版安装命令:会无法安装liuhongdi@liuhongdideMacBook-Pro poem % /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" curl: (7) Failed to connect to raw.githubusercontent.com port 443 after 45 ms: Connection refused2,我们通过gitee上的国内的镜象命令安装 文档地址:
https://gitee.com/cunkai/HomebrewCN
执行命令
liuhongdi@liuhongdideMacBook-Pro poem % /bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"如图: 下载源处我们选1 3, 安装完成配置国内源 国内镜像,此处再次选1 4,安装完成后的提示:
安装成功 但还需要重启终端 或者 运行 source /Users/liuhongdi/.zprofile 否则可能无法使用我们执行:
liuhongdi@liuhongdideMacBook-Pro poem % source /Users/liuhongdi/.zprofile5,从控制台输出的信息可以看到命令所安装到的目录:
-> 创建文件夹 /usr/local/Homebrew 运行代码 ==> /usr/bin/sudo /bin/mkdir -p /usr/local/Homebrew 此步骤成功 运行代码 ==> /usr/bin/sudo /bin/chmod -R a+rwx /usr/local/Homebrew 运行代码 ==> /usr/bin/sudo /usr/sbin/chown liuhongdi /usr/local/Homebrew 运行代码 ==> /usr/bin/sudo /usr/bin/chgrp admin /usr/local/Homebrew
二,查看安装后brew的版本:
liuhongdi@liuhongdideMacBook-Pro poem % brew --version Homebrew 4.0.10-119-g931327d Homebrew/homebrew-core (git revision 3d8b912faa5; last commit 2023-04-01) Homebrew/homebrew-cask (git revision 5d24927a9d; last commit 2023-04-01)
说明:刘宏缔的架构森林是一个专注架构的博客,地址:https://www.cnblogs.com/architectforest
对应的源码可以访问这里获取: https://github.com/liuhongdi/
或: https://gitee.com/liuhongdi
说明:作者:刘宏缔 邮箱: [email protected]
三,查看macos的版本:
标签:bin,10,macos,4.0,liuhongdi,安装,usr,Homebrew,com From: https://www.cnblogs.com/architectforest/p/17278376.html