目录:
1.mac 安装homebrew详细教程
2.macos安装homebrew
3.mac homebrew国内镜像
4.macbookpro安装homebrew
5.Mac安装homebrew
6.mac怎么安装homebrew
7.国内mac安装homebrew
8.mac安装不了homebrew
9.mac终端安装homebrew
10.macbook 安装homebrew
1.mac 安装homebrew详细教程
本文为备用链接,以防不测,请访问原文正式链接:ineo6:mac下镜像飞速安装Homebrew教程1157 赞同 · 249 评论文章
2.macos安装homebrew
Homebrew是一款包管理工具,目前支持macOS和linux系统。主要有四个部分组成: brew、homebrew-core 、homebrew-cask、homebrew-bottles。
3.mac homebrew国内镜像
本文主要介绍Homebrew安装方式以及如何加速访问,顺便普及一些必要的知识快速导航:从零安装设置镜像1. 脚本说明2020年12月14日更新:升级到shell脚本安装方式Homebrew默认安装脚本:。
4.macbookpro安装homebrew
/bin/bash -c “$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)”如果你等待一段时间之后遇到下面提示,就说明无法访问官方脚本地址:
5.Mac安装homebrew
curl: (7) Failed to connect to raw.githubusercontent.com port 443: Operation timed out请按照下面 安装说明 步骤执行。
6.mac怎么安装homebrew
安装使用到的脚本源码在此 homebrew-install 官方脚本无法使用的原因是raw.githubusercontent.com访问很不稳定,我上面提供的方案里是采用了jsdelivr CDN加速访问。
7.国内mac安装homebrew
另外也可以采用写入hosts的方式,可以一定程度解决GitHub资源无法访问的问题,我也写了一篇操作文章,有需要可以阅读下ineo6:解决GitHub网页githubusercontent地址无法访问问题。
8.mac安装不了homebrew
zhuanlan.zhihu.com/p/107691233
9.mac终端安装homebrew
2. 安装说明提前设置homebrew-core镜像源并执行:# 中科大HOMEBREW_CORE_GIT_REMOTE=https://mirrors.ustc.edu.cn/homebrew-core.git /bin/bash -c
10.macbook 安装homebrew
“$(curl -fsSL https://cdn.jsdelivr.net/gh/ineo6/homebrew-install/install.sh)”如果命令执行中卡在下面信息(如提示有差异,请反馈给我):
==> Tapping homebrew/core Cloning into /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core…请Control + C
中断脚本执行如下命令:cd”$(brew –repo)/Library/Taps/” mkdir homebrew &&cd homebrew git clone git://mirrors.ustc.edu.cn/homebrew-core.git
cask 同样也有安装失败或者卡住的问题,解决方法也是一样:cd”$(brew –repo)/Library/Taps/”cd homebrew git clone https://mirrors.ustc.edu.cn/homebrew-cask.git
成功执行之后继续执行前文的安装命令:/bin/bash -c “$(curl -fsSL https://cdn.jsdelivr.net/gh/ineo6/homebrew-install/install.sh
)”最后看到==> Installation successful!就说明安装成功了最最后更新下:brew update3. 设置镜像brew、homebrew/core是必备项目,homebrew/cask。
、homebrew/bottles按需设置通过 brew config 命令可以查看相关配置信息3.1 中科大源git -C “$(brew –repo)” remote set-url origin https://mirrors.ustc.edu.cn/brew.git git -C 。
“$(brew –repo homebrew/core)” remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git git -C
“$(brew –repo homebrew/cask)” remote set-url origin https://mirrors.ustc.edu.cn/homebrew-cask.git brew update
# 长期替换homebrew-bottlesechoexport HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles >> ~/.bash_profile
source ~/.bash_profile注意bottles可以临时设置,在终端执行下面命令:exportHOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles
3.2 清华大学源git -C “$(brew –repo)” remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git git -C
“$(brew –repo homebrew/core)” remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git git -C
“$(brew –repo homebrew/cask)” remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-cask.git brew update
# 长期替换homebrew-bottlesechoexport HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles
>> ~/.bash_profile source ~/.bash_profile3.3 恢复默认源git -C “$(brew –repo)” remote set-url origin https://github.com/Homebrew/brew.git git -C
“$(brew –repo homebrew/core)” remote set-url origin https://github.com/Homebrew/homebrew-core.git git -C
“$(brew –repo homebrew/cask)” remote set-url origin https://github.com/Homebrew/homebrew-cask.git brew update
homebrew-bottles配置只能手动删除,将 ~/.bash_profile 文件中的 HOMEBREW_BOTTLE_DOMAIN=https://mirrors.xxx.com内容删除,并执行
source ~/.bash_profile至此,安装和设置操作都完成了5. 其他相关5.1 cask目前cask是从GitHub上读取软件源,而GitHub Api对访问有限制,如果使用比较频繁的话,可以申请。
Api Token,然后在环境变量中配置到HOMEBREW_GITHUB_API_TOKEN在.bash_profile中追加:exportHOMEBREW_GITHUB_API_TOKEN=yourtoken。
注意:因为cask是从GitHub下载软件,所以目前是无法加速的5.2 如何卸载Homebrew使用官方脚本同样会遇到uninstall地址无法访问问题,可以使用下面脚本:/bin/bash -c “$(
curl -fsSL https://cdn.jsdelivr.net/gh/ineo6/homebrew-install/uninstall.sh)”6. 总结在前面的过程中我们把brew和homebrew-core
的地址都指向到中科大镜像原理是通过修改install.sh脚本,在里面预设镜像地址STAT=”stat –printf”CHOWN=”/bin/chown”CHGRP=”/bin/chgrp”GROUP。
=”$(id -gn)”TOUCH=”/bin/touch”fi# 这里替换了BREW_REPOBREW_REPO=”https://mirrors.ustc.edu.cn/brew.git”更新后的方案使用
HOMEBREW_CORE_GIT_REMOTE来预设homebrew-core源,不过这个设置方法很可能无效,欢迎小伙伴留言反馈你的效果如果对您有帮助点赞、分享、收藏,能让更多人能发现文章,这也是对我的认可和鼓励,谢谢。
参考文章清华大学开源软件镜像站中科大源 广告插播GitMaster可以树形展示git项目代码 代码树支持GitHub、GitLab、Gitee ️ 支持私有部署页面,一键标记 ️ 文件提交历史可视化 。
git historyGitHub通知提醒功能⬇️ 支持GitHub文件、目录下载
Chrome Web SoreEdge Web Store 本文首发博客: mac下镜像飞速安装Homebrew教程 – 理想乡idayer.com/mac-install-homebrew-by-cdn/
2. 分享目的仅供大家学习和交流,您必须在下载后24小时内删除!
3. 不得使用于非法商业用途,不得违反国家法律。否则后果自负!
4. 本站提供的源码、模板、插件等等其他资源,都不包含技术服务请大家谅解!
5. 如有链接无法下载、失效或广告,请联系管理员处理!
6. 本站资源售价只是赞助,收取费用仅维持本站的日常运营所需!
7. 如遇到加密压缩包,请使用WINRAR解压,如遇到无法解压的请联系管理员!
8. 精力有限,不少源码未能详细测试(解密),不能分辨部分源码是病毒还是误报,所以没有进行任何修改,大家使用前请进行甄别
丞旭猿论坛
暂无评论内容