Homebrew 7.0.0
摘要
Homebrew 7.0.0 已发布,带来多项重大改进,包括更快的安装速度、增强的安全功能、原生 macOS 应用,以及调整了对旧版 macOS 和 Intel Mac 的支持。
暂无内容
查看缓存全文
缓存时间: 2026/09/13 11:36
# 7.0.0 来源:https://brew.sh/2026/09/13/homebrew-7.0.0/
今天,我非常自豪地宣布 Homebrew 7.0.0 发布。自 6.0.0 以来最重大的变化是:更快的安装和升级、更强的沙盒安全、原生 macOS 应用、内置漏洞检查与安全公告数据库、对 macOS 10.15 支持的终止,以及 Intel Mac 转入第三级支持。
**目录**
- ⬆️ 升级 (https://brew.sh/2026/09/13/homebrew-7.0.0/#%EF%B8%8F-upgrading)
- 🍺 所有用户 (https://brew.sh/2026/09/13/homebrew-7.0.0/#-all-homebrew-users)
- 🏎️ 性能 (https://brew.sh/2026/09/13/homebrew-7.0.0/#%EF%B8%8F-performance)
- 🔒 安全 (https://brew.sh/2026/09/13/homebrew-7.0.0/#-security)
- 安全公告 (https://brew.sh/2026/09/13/homebrew-7.0.0/#security-advisories)
- 安装与 Tap 保护 (https://brew.sh/2026/09/13/homebrew-7.0.0/#installation-and-tap-protection)
- 🔎 命令与配置 (https://brew.sh/2026/09/13/homebrew-7.0.0/#-commands-and-configuration)
- 🗃️ Cask (https://brew.sh/2026/09/13/homebrew-7.0.0/#%EF%B8%8F-casks)
- 🍎 macOS 用户 (https://brew.sh/2026/09/13/homebrew-7.0.0/#-macos-users)
- 🖥️ Homebrew 应用 (https://brew.sh/2026/09/13/homebrew-7.0.0/#%EF%B8%8F-homebrew-app)
- 🐧 Linux 用户 (https://brew.sh/2026/09/13/homebrew-7.0.0/#-linux-users)
- 🍾 非默认前缀用户 (https://brew.sh/2026/09/13/homebrew-7.0.0/#-non-default-prefix-users)
- 🔍 安全团队与审计者 (https://brew.sh/2026/09/13/homebrew-7.0.0/#-security-teams-and-auditors)
- 🐳 CI 环境中的用户 (https://brew.sh/2026/09/13/homebrew-7.0.0/#-homebrew-users-in-ci)
- 🛠️ Tap 维护者 (https://brew.sh/2026/09/13/homebrew-7.0.0/#%EF%B8%8F-tap-maintainers)
- 🪜 安装步骤 (https://brew.sh/2026/09/13/homebrew-7.0.0/#-install-steps)
- 🙏 最后 (https://brew.sh/2026/09/13/homebrew-7.0.0/#-finally)
### ⬆️ 升级
自动更新或手动 `brew update`(如果您设置了 `$HOMEBREW_NO_AUTO_UPDATE`)将为您升级 Homebrew。
`Now` 表示 7.0.0 版本。已弃用接口会持续警告直至停用;已停用接口拒绝使用;已移除接口则不可用。
| 环境 | 7.0.0 行为与措施 | 时间线 | 相关 PR 链接 |
| :--- | :--- | :--- | :--- |
| macOS 10.15 或更早版本 | 升级至 macOS 11 或更高版本 | Now | [最低版本](https://github.com/Homebrew/brew/pull/23703) |
| macOS Sonoma 14 | 第三级支持;升级至 Sequoia 15+ 以获得预编译包和 `.pkg` 安装 | Now | [支持窗口](https://github.com/Homebrew/brew/pull/23928) |
| Apple Silicon 上的 macOS Golden Gate 27 | 完全支持(第一级),提供预编译包 | Now | [完全支持](https://github.com/Homebrew/brew/pull/23928) |
| `ghcr.io/homebrew/ubuntu22.04` (https://github.com/Homebrew/brew/pkgs/container/ubuntu22.04) | 镜像已移除;请迁移至 `ghcr.io/homebrew/brew` (https://github.com/Homebrew/brew/pkgs/container/brew) | Now | [通知](https://github.com/Homebrew/brew/pull/23378),[移除](https://github.com/Homebrew/brew/pull/23729) |
| `Homebrew/actions/*@master` 或 `@main` (https://github.com/Homebrew/actions) | `master` 已移除;请固定到 CalVer 版本 (https://github.com/Homebrew/actions/releases) 或完整 SHA | Now | [分支迁移](https://github.com/Homebrew/actions/pull/838),[发布](https://github.com/Homebrew/actions/pull/883) |
| 具有不同实际和有效 UID 的 Setuid 包装器 | 拒绝;请以安装所有者身份运行,无需包装器 | Now | [执行模型](https://github.com/Homebrew/brew/pull/23955) |
| 第三方 `brew` 包装器 | 第三级支持;内部命令将绕过包装器;请向包装器项目寻求支持 | Now | [包装器更改](https://github.com/Homebrew/brew/pull/23783) |
| `Homebrew/brew` `master` (https://github.com/Homebrew/brew/tree/master) | 引导程序已冻结;请切换到 `main` (https://github.com/Homebrew/brew/tree/main),移除前 | 2027-03-01 | [引导程序](https://github.com/Homebrew/brew/pull/23733) |
| Intel macOS 11 或更高版本 | 第三级支持;不再构建新包;请在 Homebrew 停止运行前迁移至 [MacPorts](https://www.macports.org/) | 2027-09-01 | [支持](https://github.com/Homebrew/brew/pull/23679),[软件包](https://github.com/Homebrew/brew/pull/23677) |
| Apple Silicon macOS 11 | 请在支持结束前升级至 macOS 12 或更高版本 | 2027-09-01 | [支持计划](https://github.com/Homebrew/brew/pull/20497) |
| 第三方 formula 的 `post_install` 和 cask flight 块 | 已弃用;请迁移至 `*_steps`;`brew style --fix` 可转换常见钩子 | 2027-12-11 | [弃用](https://github.com/Homebrew/brew/pull/23729),[迁移](https://github.com/Homebrew/brew/pull/23195) |
### 🍺 所有用户
以下改进适用于所有平台,除非另有说明。
#### 🏎️ 性能
在下载、准备和安装过程中实现更高并发,最大化性能,同时协调故障和总结报告。
- `brew install`、`brew reinstall` 和 `brew upgrade` 重叠软件包准备和下载 (https://github.com/Homebrew/brew/pull/23549),包括 `brew bundle` 批处理 (https://github.com/Homebrew/brew/pull/23871),减少软件包间的等待时间,并允许 `Brewfile` 像指定多个软件包的命令一样,受益于相同的共享安装工作。
- `brew config` 并发收集独立的系统信息 (https://github.com/Homebrew/brew/pull/22989),因此编译器、操作系统和仓库检查重叠进行,而不是让诊断报告等待每个子进程完成。
- `brew tap-info --installed --json=v1` 并发收集 tap 元数据,缩短需要 Git 或网络检查多个仓库时的清单请求时间,同时保留脚本期望的输出顺序。(https://github.com/Homebrew/brew/pull/22975)
- `brew cleanup` 避免重复扫描缓存,加快拥有大量软件包的安装的清理速度。(https://github.com/Homebrew/brew/pull/23515)
- `brew fetch` 直接从 API 元数据读取 [软件包](https://github.com/Homebrew/brew/pull/22666) 和 [Cask](https://github.com/Homebrew/brew/pull/22670) 的下载信息,无需加载完整的软件包定义即可开始下载。
- `brew update` 准备 Ruby 缓存,使后续命令启动更快。(https://github.com/Homebrew/brew/pull/23108)
- Homebrew 在后续运行中重用已解析的 API 数据,同时在每次加载时验证签名,减少重复软件包命令的准备时间,同时不降低真实性检查。(https://github.com/Homebrew/brew/pull/23300)
- Homebrew 在启动期间启动更少的子进程 (https://github.com/Homebrew/brew/pull/23298),减少命令开销,并直接读取终端尺寸 (https://github.com/Homebrew/brew/pull/23952),避免 uutils `stty` 导致的挂起。
#### 🔒 安全
Homebrew 7.0.0 包含各种安全修复和新的安装保护措施。
##### 安全公告
首批修复版本如下:
- **[GHSA-rg9r-ppxp-87hm](https://github.com/Homebrew/brew/security/advisories/GHSA-rg9r-ppxp-87hm)(高危),修复于 6.0.12:** 未签名的 cask 移除元数据可能以 `sudo` 权限执行命令;所有受影响的恢复代码和 API 访问器已被删除 (https://github.com/Homebrew/brew/pull/23772)。
- **[GHSA-5263-whxq-77hp](https://github.com/Homebrew/brew/security/advisories/GHSA-5263-whxq-77hp)(中危),修复于 7.0.0:** 恶意 cask 可能通过 LaunchServices 在 macOS 安装沙盒外执行代码;Homebrew 限制了 [应用启动](https://github.com/Homebrew/brew/pull/23907)、[Mach 服务](https://github.com/Homebrew/brew/pull/23909) 和 [Unix 套接字连接](https://github.com/Homebrew/brew/pull/23920)。
- **[GHSA-hqpg-hjr9-c7j8](https://github.com/Homebrew/brew/security/advisories/GHSA-hqpg-hjr9-c7j8)(中危),修复于 6.0.12:** macOS 安装程序会忽略前缀拥有的 [Git 配置](https://github.com/Homebrew/brew/pull/23747),该配置可能以 root 权限执行程序。
- **[GHSA-x82f-cj53-gqfr](https://github.com/Homebrew/brew/security/advisories/GHSA-x82f-cj53-gqfr)(低危),修复于 6.0.7:** `brew livecheck` [限制重定向](https://github.com/Homebrew/brew/pull/22944) 以防止服务器端请求伪造。
- **[GHSA-3m5g-jfx7-3p65](https://github.com/Homebrew/brew/security/advisories/GHSA-3m5g-jfx7-3p65)(低危),修复于 6.0.7:** 下载重定向不能将秘密头部转发到其他主机 (https://github.com/Homebrew/brew/pull/22945)。
- **[GHSA-r9gp-p4vv-f93x](https://github.com/Homebrew/brew/security/advisories/GHSA-r9gp-p4vv-f93x)(低危),修复于 6.0.6:** Git 重定向不能绕过 tap 限制 (https://github.com/Homebrew/brew/pull/22909)。
- **[GHSA-9g4r-vmj2-j2gj](https://github.com/Homebrew/brew/security/advisories/GHSA-9g4r-vmj2-j2gj)(低危),修复于 6.0.7:** Subversion 外部 URL 不能成为命令选项 (https://github.com/Homebrew/brew/pull/22942)。
- **[GHSA-r7qx-325v-4ccx](https://github.com/Homebrew/brew/security/advisories/GHSA-r7qx-325v-4ccx)(低危),修复于 6.0.6:** 补丁目标不能逃出暂存源代码树 (https://github.com/Homebrew/brew/pull/22881)。
##### 安装与 Tap 保护
[Tap 信任](https://docs.brew.sh/Tap-Trust) 仍然是抵御恶意第三方 cask 的主要保护措施;沙盒主要限制意外损坏并增加安装保障。它无法使不受信任的软件安全运行:应用程序以用户权限执行,供应商 `.pkg` 安装程序在沙盒[外运行](https://docs.brew.sh/Cask-Cookbook#cask-artifact-trust-and-sandboxing),可能需要 `sudo`。我们力求在更严格的限制与保持现有软件工作之间取得平衡。
- Homebrew 以签名数据形式提供结构化设置,并对 [formula](https://github.com/Homebrew/brew/pull/23202) 和 [cask](https://github.com/Homebrew/brew/pull/23461) 操作进行沙盒化,减少任意 Ruby 执行和重复的软件包加载。
- Homebrew 开始将依赖项下载迁移到 `fetch` 阶段 (https://github.com/Homebrew/brew/pull/23657):已迁移的 formula 在有网络访问和可写缓存的情况下下载,然后 `install` 禁用网络并使这些缓存只读;迁移仍在进行中。
- Homebrew 默认阻止对主目录的沙盒读取 (https://github.com/Homebrew/brew/pull/22660),将不相关的个人文件排除在软件包构建之外,同时允许必要的 Homebrew 路径;私有临时目录让构建工具可以在本地通信,而无需启用网络访问 (https://github.com/Homebrew/brew/pull/23940)。
- Homebrew 在读取配置前拒绝不匹配的实际和有效用户 ID (https://github.com/Homebrew/brew/pull/23955),移除了针对不支持的共享安装的未测试权限切换代码。
信任与环境迁移和替换。(https://brew.sh/7.0.0-migration-guide/#trust-and-environment)
#### 🔎 命令与配置
命令提供更清晰的预览、软件包信息和服务配置。
- `brew install --dry-run` 一起预览 formula 和 cask。(https://github.com/Homebrew/brew/pull/23874)
- `brew list --no-installed-on-request` 识别作为依赖项安装的 formula。(https://github.com/Homebrew/brew/pull/22829)
- `brew info` 用 `⊘` 区分不可安装的软件包,用 `✘` 区分未安装的软件包 (https://github.com/Homebrew/brew/pull/23853),并标记未满足的操作系统和架构要求 (https://github.com/Homebrew/brew/pull/23841),使您更容易在开始安装前了解软件包是否可以在当前机器上运行。
- `brew services` 从 `$HOMEBREW_USER_CONFIG_HOME/services/.env` 读取持久化覆盖,允许本地服务设置在软件包升级后仍然有效,并在重启时生效,无需编辑生成的服务文件 (https://github.com/Homebrew/brew/pull/23312)。新启动和重启的服务在 [macOS](https://github.com/Homebrew/brew/pull/23750) 和 [Linux](https://github.com/Homebrew/brew/pull/23837) 上使用 `sh.brew.`,在重启前识别旧版注册。
- `brew bundle` 从声明的来源恢复语言工具:Cargo Git 仓库或路径 (https://github.com/Homebrew/brew/pull/23451),以及用于远程 `uv` 工具的 `source:` (https://github.com/Homebrew/brew/pull/22963)。
- `brew doctor --json` 为自动化提供结构化诊断 (https://github.com/Homebrew/brew/pull/22448);`brew doctor` 还会在 `PATH` 中有另一个 `brew` 遮蔽当前安装时发出警告 (https://github.com/Homebrew/brew/pull/23783),帮助诊断包装器和安装冲突。
- `brew deps --brewfile` 检查 Brewfile 的依赖项,使您更容易在安装开发环境前查看该环境将引入的软件包。(https://github.com/Homebrew/brew/pull/23104)
- `brew untap` 提供先卸载 tap 软件包的选项,允许一起移除不需要的软件包源及其已安装的软件。(https://github.com/Homebrew/brew/pull/23278)
- `HOMEBREW_AUTO_UPDATE_QUIET` 抑制自动更新的软件包详情,在正常使用的后台更新时,保持常规命令输出聚焦。(https://github.com/Homebrew/brew/pull/23455)
- Homebrew 停止向子进程导出自身的 `BUNDLER_VERSION`,允许 formula 构建使用其所需的 Bundler 版本。(https://github.com/Homebrew/brew/pull/23950)
`Brewfile` 将语言工具来源与其他软件包一起记录,在另一台机器上重现环境时减少单独的安装说明。
命令和配置迁移及替换。(https://brew.sh/7.0.0-migration-guide/#commands-and-configuration)
#### 🗃️ Cask
当 formula 和 cask 提供相同命令时,formula 链接优先,同时提供警告解释如何恢复 cask 链接。(https://github.com/Homebrew/brew/pull/23925)
- `brew upgrade` 在升级兼容应用时跳过不兼容的 cask (https://github.com/Homebrew/brew/pull/23012);它和 `brew outdated` 都遵守 `HOMEBREW_NO_UPGRADE_AUTO_UPDATES_CASKS` (https://github.com/Homebrew/brew/pull/22825),保留自更新应用的[退出选择](https://docs.brew.sh/FAQ#how-does-brew-upgrade-handle-apps-that-update-themselves)。
- `brew uninstall` 移除 API 中缺失的 cask 记录,并警告可能的残留文件 (https://github.com/Homebrew/brew/pull/23210),并在文件已属于当前用户时避免不必要的密码提示 (https://github.com/Homebrew/brew/pull/23948)。
- `brew link` 和 `brew unlink` 接受 `--cask`/`--casks` 和 `--formula`/`--formulae`,允许在不重新安装的情况下禁用或恢复 cask 二进制文件、手册页和补全功能;`--dry-run` 预览更改,而 `brew link --overwrite` 替换冲突,`--force` 仅替换来自同一 cask 的符号链接。(https://github.com/Homebrew/brew/pull/23925)
- Homebrew 的 API 包含 cask 语言变体 (https://github.com/Homebrew/brew/pull/23124),允许安装从软件包数据中选择适当的 URL、校验和和构件,而无需为每种语言选择评估 cask 的 Ruby 定义。
Cask 配置迁移和替换。(https://brew.sh/7.0.0-migration-guide/#cask-configuration)
### 🍎 macOS 用户
**Homebrew 将 macOS Intel `x86_64` 于 2026 年 9 月转入第三级支持,此决定于 2025 年 8 月宣布 (https://github.com/Homebrew/brew/pull/20497) 并在 2025 年 11 月 12 日的 5.0.0 发布说明中重申 (https://brew.sh/2025/11/12/homebrew-5.0.0/);7.0.0 也停止了对 macOS 10.15 的支持。**Homebrew 将在 Intel 上运行至 2027 年 9 月,但不提供项目支持或常规软件包构建。Apple 和 GitHub 对 Intel 支持的撤退超出了 Homebrew 志愿者所能替代的范围。
- `brew services run` 应用每个服务的环境覆盖,而不注册登录服务,使临时运行使用与永久注册服务相同的配置。(https://github.com/Homebrew/brew/pull/23869)
- `brew shellenv` 直接设置 `PATH`,避免 macOS `path_helper` 子进程和配置文件写入。(https://github.com/Homebrew/brew/pull/23780)
- `brew formula` 和 `brew cask` 通常根据需要提供符号链接,减少软件包安装或卸载后的冗余工作;`brew list --formula` 和 `brew list --cask` 一起列出所有内容。(https://github.com/Homebrew/brew/pull/23861)
#### 🖥️ Homebrew 应用
macOS 上新的原生应用提供图形界面,用于检查更新和浏览已安装的软件包,支持 Spotlight 搜索和通知中心集成。(https://github.com/Homebrew/homebrew-app)
应用配置迁移和替换。(https://brew.sh/7.0.0-migration-guide/#homebrew-app)
相似文章
Show HN: Homebrew 6.0.0
Homebrew 6.0.0 引入了 tap 信任安全机制、新的默认内部 JSON API 以加快更新、通过 Bubblewrap 实现的 Linux 沙盒,以及基于用户调查反馈的各种改进。
WordPress 7.0
WordPress 7.0(代号 Armstrong)已发布,标志着这款热门内容管理系统的一次重大更新。
OpenBSD 7.9 发布
OpenBSD 7.9 已发布,包含针对 arm64、amd64、luna88k、riscv64 等架构的平台特定改进,以及各种错误修复和增强的硬件支持。
macOS 27 现已发布
macOS 27 Golden Gate 现已面向 Apple Silicon Mac 发布,引入了 Siri AI 助手、Liquid Glass 用户界面改进以及增强的性能。
WordPress 7.0
WordPress 7.0 是一个重大版本,包含重新设计的导航覆盖层、通过集中式 Connectors 中心实现的人工智能集成、可视化修订、将模式作为单个块处理、性能提升、改进的可访问性以及焕然一新的管理体验。