gpt4 book ai didi

macos - brew cask 更新或卸载错误 : definition is invalid: invalid 'depends_on macos' value: ":lion"

转载 作者:行者123 更新时间:2023-12-02 00:04:28 28 4
gpt4 key购买 nike

由于定义错误,我无法卸载或升级某些木桶。

F.e.如果我运行更新或升级:

brew cask upgrade the-unarchiver  
Error: Cask 'the-unarchiver' definition is invalid: invalid 'depends_on macos' value: ":lion"

brew cask uninstall the-unarchiver
Error: Cask 'the-unarchiver' definition is invalid: invalid 'depends_on macos' value: ":lion"

我尝试查看公式中是否有可以编辑的内容,但没有找到与此错误相关的任何内容。

cask 'the-unarchiver' do
version '4.1.0,121:1549634528'
sha256 'ff97b168f07d084e88f48e5d1e5202445596acd6eec39685d28910ee71d3a74b'

# devmate.com/com.macpaw.site.theunarchiver was verified as official when first introduced to the cask
url "https://dl.devmate.com/com.macpaw.site.theunarchiver/#{version.after_comma.before_colon}/#{version.after_colon}/TheUnarchiver-#{version.after_comma.before_colon}.zip"
appcast 'https://updates.devmate.com/com.macpaw.site.theunarchiver.xml'
name 'The Unarchiver'
homepage 'https://theunarchiver.com/'

auto_updates true

app 'The Unarchiver.app'

zap trash: [
'~/Library/Caches/cx.c3.theunarchiver',
'~/Library/Cookies/cx.c3.theunarchiver.binarycookies',
'~/Library/Preferences/cx.c3.theunarchiver.plist',
'~/Library/Saved Application State/cx.c3.theunarchiver.savedState',
]
end

最佳答案

由于维护开销较高,Homebrew cask 开发人员删除了 pre-maverics 依赖项支持,而且看起来他们引入了一个错误。

修复它的方法是运行:

/usr/bin/find "$(brew --prefix)/Caskroom/"*'/.metadata' -type f -name '*.rb' -print0 | /usr/bin/xargs -0 /usr/bin/perl -i -0pe 's/depends_on macos: \[.*?\]//gsm;s/depends_on macos: .*//g'

您可以在以下位置找到此解决方案、此错误的原因以及更多信息:

https://github.com/Homebrew/homebrew-cask/issues/58046

关于macos - brew cask 更新或卸载错误 : definition is invalid: invalid 'depends_on macos' value: ":lion",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55353778/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com