Mac安装Homebrew并设置国内源
1.Homebrew简介
Homebrew是一款Mac OS平台下的软件包管理工具,拥有安装、卸载、更新、查看、搜索等很多实用的功能。简单的一条指令,就可以实现包管理,而不用你关心各种依赖和文件路径的情况,十分方便快捷。
2.Homebrew安装
2.1.官方安装
- 官网:https://brew.sh/zh-cn/
- 用官网命令安装
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"注意: 官方安装需要魔法,没有魔法安装会很慢,安装好后的homebrew是通过官方源进行安装的,不用魔法的话速度也是很慢,可以自己手动修改homebrew的源地址为国内源,如果不想折腾请看下面的方法
2.2.一键式国内源安装(推荐新手)
- 终端中执行如下命令
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"- 按回车后,脚本将自动检测系统架构,并列出可选镜像源(如 1-中科大、2-清华、3-阿里云);输入对应数字并回车确认
- 提示输入密码时,键入当前用户管理员密码(输入过程不显示字符,输完直接回车)
- 等待安装完成,期间会自动处理 /opt/homebrew(Apple Silicon)或 /usr/local(Intel)路径适配
3.验证
- 如下命令可以输出homebrew的版本信息
brew --version4.简单使用
- 更新 Homebrew 到最新版本
brew update- 升级所有已安装的软件包
brew upgrade- 安装一个软件包
brew install <package_name>
brew install wget # 以wget为例- 搜索软件包
brew search <package_name>
brew search wget # 以wget为例- 查看已安装的软件包
brew list- 卸载一个软件包
brew uninstall <package_name>
brew uninstall wget # 以wget为例- 清理 Homebrew 的缓存
brew cleanup
下载看看
I drop a comment whenever I like a article on a site or I have something to valuable to contribute to the discussion. Usually it is a result of the fire displayed in the article I looked at. And on this article Freewind主题音乐播放器(老王重制版) - 冷文学习者. I was actually excited enough to post a comment :-) I actually do have a few questions for you if it's okay. Could it be just me or do some of these responses appear like left by brain dead people? :-P And, if you are posting at other places, I would like to keep up with everything new you have to post. Could you list the complete urls of your communal sites like your linkedin profile, Facebook page or twitter feed? Feel free to surf to my blog post :: https://bonusstats.com/en/bonus-7signs
Thanks for finally talking about >Freewind 1.5 更新 - 冷文学习者
下载看看
我要回复一下课件