OSX 下面 `brew` 卸载软件失败,怎样解决?

执行的命令:

[[email protected] ~]$ brew cask uninstall eclipse-ide 
Error: Cask 'eclipse-ide' definition is invalid: invalid 'depends_on macos' value: ":leopard"

解决办法:https://github.com/Homebrew/homebrew-cask/issues/58046

我觉得可以直接在Application文件夹中删除这个软件

1 个赞

直接在Application里面删除之后brew中会残留一些配置,导致 brew cask upgrade 升级失败,就像下面这样

Last login: Thu Feb 21 11:10:27 on ttys003
[[email protected] ~]$ brew cask upgrade 
Updating Homebrew...
==> Casks with `auto_updates` or `version :latest` will not be upgraded
==> Upgrading 7 outdated packages:
Error: Cask 'eclipse-ide' definition is invalid: invalid 'depends_on macos' value: ":leopard"
[[email protected] ~]$ brew cask outdated 
eclipse-ide (4.8.0,photon:R) != 4.10.0,2018-12:R
font-source-serif-pro (2.000R) != 2.007R-ro%2F1.007R-it
gimp (2.8.22) != 2.10.8,2
java (10.0.1,10:fb4372174a714e6b8c52526dc134031e) != 11.0.2,9
openzfs (1.7.2,ea) != 1.8.1,25
qq (6.4.0) != 6.5.2
wireshark (2.6.0) != 2.6.6

试试 brew remove -f xxx 或者直接删除 /usr/local/opt/XXX/

1 个赞

还是不行哦

[[email protected] ~]$ brew cask remove eclipse-ide
Error: Cask 'eclipse-ide' definition is invalid: invalid 'depends_on macos' value: ":leopard"
[[email protected] ~]$ brew cask remove -f eclipse-ide
Error: Cask 'eclipse-ide' definition is invalid: invalid 'depends_on macos' value: ":leopard"

已解决,参照:https://github.com/Homebrew/homebrew-cask/issues/58046