mac 安装HomeBrew

目录

一、HomeBrew是什么?

homebrew是一款Mac OS平台下的软件包管理工具,拥有安装、卸载、更新、查看、搜索等功能。通过简单的指令可以实现包管理,而不用关心各种依赖和文件路径情况。

二、HomeBrew命令

1、检查是否安装HomeBrew

powershell 复制代码
brew -v

下面是没有安装brew截图:

2、更新brew版本

powershell 复制代码
brew update

<br

三、安装HomeBrew

1、官网安装

在终端执行如下命令:

powershell 复制代码
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

如果安装不上,一般报如下错误:

powershell 复制代码
curl: (7) Failed to connect to raw.githubusercontent.com port 443 after 23 ms: Couldn't connect to server

无法链接服务器下载,需要梯子,有梯子基本没有问题。

2、100%成功安装

安装指令:

powershell 复制代码
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/Homebrew.sh)"



重启终端之后,执行brew -v命令,正常输出就说明安装成功了。

卸载命令:

powershell 复制代码
/bin/zsh -c "$(curl -fsSL https://gitee.com/cunkai/HomebrewCN/raw/master/HomebrewUninstall.sh)"
相关推荐
sg_knight9 小时前
Claude Code 安装指南(macOS / Linux / Windows WSL)
linux·windows·macos·claude·code·anthropic·claude-code
2601_9615934218 小时前
Rust 开发环境配置繁琐?RustRover 开箱即用搞定编码调试
开发语言·后端·macos·rust
在水一缸19 小时前
拒绝被打扰:深度解析 macOS 进程守护与“反自动启动”攻防战
macos·策略模式·用户体验·进程守护·自动启动·系统权限
REDcker1 天前
macOS 挂载 Linux 远程目录详解
linux·运维·macos
2601_961593421 天前
Mac 上搭建Linux环境吗?VMware + CentOS Stream 9 镜像快速部署
linux·运维·ide·macos·centos
陪我去看海1 天前
受够了 AI 写完代码留下一堆端口?我做了一个端口管理App!
前端·macos·vibecoding
发光的沙子1 天前
FPGA----配置根文件系统ip和mac地址
网络协议·tcp/ip·macos
2601_961593421 天前
Mac 虚拟机跑 Linux 选哪个?CentOS 8 稳定版适配方案
linux·macos·centos
IT·陈寒1 天前
macOS 安装 Claude Code 全流程
人工智能·macos·策略模式