跳转到内容

does not run on macOS versions other than Monterey:CC Switch 安装失败

Quick fix

先执行 brew update 后重试安装;若 cask 仍锁定 Monterey,需将 macOS 条件改为 >= :monterey。

报错原文
Error: This software does not run on macOS versions other than Monterey.

Homebrew cask 中的 `depends_on macos: :monterey` 会被解析为仅允许 macOS 12,而不是 Monterey 及更高版本,因此 macOS 13、14、15 即使能够运行 CC Switch,也会在安装阶段被 Homebrew 拦截。`brew info --cask cc-switch` 会将该条件显示为 `Required: macOS == 12`。

相关 issue 涉及 v3.15.0、v3.16.0 和 v3.16.2。维护者建议先用 `brew update` 刷新 cask 元数据后重试,并在另一条关闭回复中建议升级到 4.0;但两个 issue 均未确认更新后的 cask 已彻底修复该条件,其中一个因超时而关闭。

  1. 执行 `brew update` 更新 Homebrew 和 cask 元数据,然后重新运行 `brew install --cask cc-switch`。

  2. 如果维护 cask 定义,将 `farion1231/homebrew-ccswitch` 中仅允许 Monterey 的条件改为允许 Monterey 及更高版本。

    https://github.com/farion1231/homebrew-ccswitch/blob/HEAD/Casks/cc-switch.rb
    depends_on macos: :monterey
    depends_on macos: ">= :monterey"
  3. 对 `homebrew/cask` 中的同一条件应用相同修改。

    https://github.com/Homebrew/homebrew-cask/blob/master/Casks/c/cc-switch.rb
    depends_on macos: :monterey
    depends_on macos: ">= :monterey"
  4. 若更新后仍被 cask 阻止,可从 GitHub Releases 手动安装;issue 报告确认 v3.16.2 在 macOS 15.1 arm64 上可启动,并使用 `xattr -rd com.apple.quarantine "/Applications/CC Switch.app"` 清除隔离属性。

ToolHomebrew
Version3.15.0 - 3.16.2(受影响)
PlatformsmacOS
macOS 14 安装出现以上提示,是否存在问题?
是。issue 中确认这是 Homebrew cask 的 `depends_on macos` 被错误锁定为仅 Monterey,并非 CC Switch 应用本身无法在 macOS 14 上运行。先执行 `brew update` 再重试;若错误仍存在,则说明当前 cask 元数据仍包含该限制。

这是一个非官方社区 wiki,与 cc-switch 作者及项目本身无隶属关系。内容整理自项目公开的 GitHub issues。本站不分发任何软件。