目录:
1.Homebrew下载
2.homebrew安装教程
3.homebrew怎么打开
4.homebrew下载速度慢
5.homebrew升级
6.homebrew下载失败
7.homebrew 更新
8.如何安装homebrew
9.怎么安装homebrew
1.Homebrew下载
Homebrew是一款Mac OS平台下的软件包管理工具,拥有安装、卸载、更新、查看、搜索等很多实用的功能简单的一条指令,就可以实现包管理,而不用你关心各种依赖和文件路径的情况,十分方便快捷HomeBrew是一个很棒的仓库,但是由于网络复杂等原因,尝尝无法使用brew下载包文件,本文提供两种国内镜像源,不妨试试。
2.homebrew安装教程
1. 中科大镜像源需要替换为中科大源,请执行以下代码:cd “$(brew –repo)” git remote set-url origin git://github.com/Homebrew/brew cd “$(brew –repo)” git remote set-url origin https://mirrors.ustc.edu.cn/brew.git cd “$(brew –repo)/Library/Taps/homebrew/homebrew-core” git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git cd brew update echo export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.ustc.edu.cn/homebrew-bottles >> ~/.bash_profile source ~/.bash_profile
3.homebrew怎么打开
2. 清华大学源需要替换为清华大学源,请执行以下代码:cd “$(brew –repo)” git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/brew.git cd “$(brew –repo)/Library/Taps/homebrew/homebrew-core” git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-core.git cd brew update echo export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles >> ~/.bash_profile source ~/.bash_profile
4.homebrew下载速度慢
3. 使用homebrew-science或者homebrew-python使用如下代码切换:cd “$(brew –repo)/Library/Taps/homebrew/homebrew-science” git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-science.git cd “$(brew –repo)/Library/Taps/homebrew/homebrew-python” git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew/homebrew-python.git cd brew update
5.homebrew升级
4. 切回官方源有时候,上述中科大源或清华源失效或宕机,需要切换回官方源:首先下载brew_instal文件cd ~ curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install >> brew_install
6.homebrew下载失败
编辑brew_instal文件HOMEBREW_PREFIX = “/usr/local”.freeze HOMEBREW_REPOSITORY = “/usr/local/Homebrew”.freeze HOMEBREW_CACHE = “#{ENV[“HOME”]}/Library/Caches/Homebrew”.freeze HOMEBREW_OLD_CACHE = “/Library/Caches/Homebrew”.freeze BREW_REPO = “https://github.com/Homebrew/brew”.freeze #BREW_REPO = “git://mirrors.ustc.edu.cn/brew.git”.freeze CORE_TAP_REPO = “https://github.com/Homebrew/homebrew-core”.freeze #CORE_TAP_REPO = “git://mirrors.ustc.edu.cn/homebrew-core.git”.freeze
7.homebrew 更新
注释掉:BREW_REPO = “git://mirrors.ustc.edu.cn/brew.git”.freeze CORE_TAP_REPO = “git://mirrors.ustc.edu.cn/homebrew-core.git”.freeze
8.如何安装homebrew
修改为:BREW_REPO = “https://github.com/Homebrew/brew”.freeze CORE_TAP_REPO = “https://github.com/Homebrew/homebrew-core”.freeze
9.怎么安装homebrew
安装,运行修改了的brew_install文件/usr/bin/ruby ~/brew_install 替换homebrew默认源cd “$(brew –repo)” git remote set-url origin https://github.com/Homebrew/brew.git cd “$(brew –repo)/Library/Taps/homebrew/homebrew-core” git remote set-url origin https://github.com/Homebrew/homebrew-core.git cd brew update 。
在Mac OS X 10.11系统以后,/usr/local/等系统目录下的文件读写是需要系统root权限的,以往的Homebrew安装如果没有指定安装路径,会默认安装在这些需要系统root用户读写权限的目录下,导致有些指令需要添加sudo前缀来执行。
2. 分享目的仅供大家学习和交流,您必须在下载后24小时内删除!
3. 不得使用于非法商业用途,不得违反国家法律。否则后果自负!
4. 本站提供的源码、模板、插件等等其他资源,都不包含技术服务请大家谅解!
5. 如有链接无法下载、失效或广告,请联系管理员处理!
6. 本站资源售价只是赞助,收取费用仅维持本站的日常运营所需!
7. 如遇到加密压缩包,请使用WINRAR解压,如遇到无法解压的请联系管理员!
8. 精力有限,不少源码未能详细测试(解密),不能分辨部分源码是病毒还是误报,所以没有进行任何修改,大家使用前请进行甄别
丞旭猿论坛
暂无评论内容