一招教你怎么使用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爱好者其它相关文章!
-
如何快速下载高清MV视频 最新MV下载方法教程分享 时间:2025-09-07
-
如何快速下载FLV视频文件 简单实用的下载方法教程 时间:2025-09-07
-
mp4视频下载方法大全 简单几步教你快速下载高清mp4文件 时间:2025-09-07
-
DVD解码器免费下载安装指南:高清视频播放全攻略 时间:2025-09-07
-
Flash动画下载方法大全 简单几步轻松保存经典动画 时间:2025-09-07
-
快速退订黄钻会员的详细步骤教程 手把手教你取消自动续费 时间:2025-09-07
今日更新
-
天空梗是什么梗?揭秘网络爆火天空表情包的搞笑起源与玩法
阅读:18
-
想知道天籁是什么梗?揭秘网络热词天籁的爆笑来源和流行用法!
阅读:18
-
想知道天蓝怪是什么梗吗?揭秘这个火爆网络的神秘热词,让你秒懂潮流!
阅读:18
-
天蓝怪行为是什么梗?揭秘网络爆火神秘现象背后的搞笑真相!
阅读:18
-
重返未来:1999新角色野树莓-野树莓抽取建议
阅读:18
-
以闪亮之名全新主线之旅-章节第36章即将开启
阅读:18
-
梦幻西游恶魔泡泡怎么获得-恶魔泡泡获取方法
阅读:18
-
崩坏星穹铁道3.6版本新内容公布-可免费获五星角色
阅读:18
-
天雷滚滚是什么梗?揭秘网络热词背后的爆笑名场面
阅读:18
-
如鸢袁基大活月海夜航船活动-1-16关入夜详细
阅读:18