一招教你怎么使用mac 安装配置 homebrew(代码分享)
时间:2021-09-08
来源:互联网
标签:
今天PHP爱好者给大家带来使用mac安装配置homebrew方法教程,之前的文章《浅析JS中base64和图片互相转换(附代码)》中,给大家了解了JS中base64和图片互相转换。下面本篇文章给大家介绍怎么使用mac安装配置homebrew,我们一起看看怎么做。希望对大家有所帮助。

最近换电脑了,发现homebrew安装不上了,我感觉是网络问题,连了个vpn,发现还是不行,哈哈,是姿势不对
安装
运行下面自动脚本(已经全部替换为国内地址):
(Mac)常规安装脚本(推荐完全体几分钟安装完成)
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"
(Mac)精简版几秒钟安装完成
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)" speed
(Mac)卸载脚本
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/HomebrewUninstall.sh)"
(Linux)安装脚本:
rm Homebrew.sh ; wget https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh ; bash Homebrew.sh
(Linux)卸载脚本:
rm HomebrewUninstall.sh ; wget https://gitee.com/cunkai/HomebrewCN/raw/master/HomebrewUninstall.sh ; bash HomebrewUninstall.sh
安装问题
如果发现有各种安装不上的运行:
sudo rm -rf /usr/local/Homebrew
提示系统太旧的 (Failed to install Homebrew Portable Ruby (and your system version is too old)!) 运行:
HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles/bottles-portable-ruby
rm -rf /Users/$(whoami)/Library/Caches/Homebrew/
brew update
切换镜像源
阿里云homebrew
配置方法:[https://developer.aliyun.com/mirror/homebrew]。
# 替换brew.git:
cd "$(brew --repo)"
git remote set-url origin https://mirrors.aliyun.com/homebrew/brew.git
# 替换homebrew-core.git:
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.aliyun.com/homebrew/homebrew-core.git
# 应用生效
brew update
# 替换homebrew-bottles:
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.aliyun.com/homebrew/homebrew-bottles' >> ~/.bash_profile
source ~/.bash_profile
腾讯云homebrew
配置方法:Homebrew镜像使用帮助
[https://mirrors.cloud.tencent.com/help/homebrew.html]。
cd "$(brew --repo)"
git remote set-url origin http://mirrors.cloud.tencent.com/git/homebrew/brew.git
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin http://mirrors.cloud.tencent.com/git/homebrew/homebrew-core.git
brew update
配置方法:Homebrew-bottles镜像使用帮助
[https://mirrors.cloud.tencent.com/help/homebrew-bottles.html]。
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.cloud.tencent.com/homebrew-bottles' >> ~/.bash_profile
source ~/.bash_profile
中科大homebrew
配置方法:Homebrew源使用帮助[http://mirrors.ustc.edu.cn/help/brew.git.html]。
cd "$(brew --repo)"
git remote set-url origin https://mirrors.ustc.edu.cn/brew.git
配置方法:Homebrew Core源使用帮助[http://mirrors.ustc.edu.cn/help/homebrew-core.git.html]。
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
配置方法:Homebrew Bottles源使用帮助[http://mirrors.ustc.edu.cn/help/homebrew-bottles.html]。
echo 'export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles' >> ~/.bash_profile
source ~/.bash_profile
以上就是一招教你怎么使用mac 安装配置 homebrew(代码分享)的详细内容,更多请关注php爱好者其它相关文章!
-
电脑中远程访问功能怎么删除?删除远程访问功能详细步骤(电脑中远程访问怎么弄) 时间:2025-11-04 -
win7本地ip地址怎么设置?win7设置本地ip地址操作步骤(win7本机ip地址在哪里) 时间:2025-11-04 -
电脑中任务管理器被禁用怎么处理?任务管理器被禁用的详细解决方案(电脑中任务管理器显示内存如何释放) 时间:2025-11-04 -
2023年中央空调十大品牌选购指南 家用商用高性价比推荐排行 时间:2025-09-28 -
免费装扮QQ空间详细教程 手把手教你打造个性化空间不花钱 时间:2025-09-28 -
中国数字资产交易平台官网 - 安全可靠的数字货币交易与投资首选平台 时间:2025-09-28
今日更新
-
什么吖是什么梗?揭秘00后最爱用的卖萌语气词,这样用可爱度翻倍!
阅读:18
-
币安欧易平台币手续费折扣对比 最新优惠比例解析
阅读:18
-
币安BNB与欧易OKB手续费抵扣对比 哪个更划算
阅读:18
-
揭秘阿杜梗爆火真相:全网热议的搞笑名场面解析
阅读:18
-
币安与欧易大宗交易手续费对比 哪家优惠更定制化
阅读:18
-
币安与欧易API交易费率对比 关键差异解析
阅读:18
-
张阿姨是什么梗 揭秘全网爆火的张阿姨热梗由来和表情包
阅读:18
-
"什么爱你是什么梗"揭秘:全网爆火表白梗背后的甜蜜真相
阅读:18
-
币安与欧易做市商返佣对比:哪家收益更高更划算
阅读:18
-
币安vs欧易:小额交易手续费对比哪家门槛更高
阅读:18










