gpt4 book ai didi

homebrew-cask - 如何手动卸载 Homebrew 桶?

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

我安装了一个 Homebrew 桶,当我尝试卸载它时,它给了我一个错误:

$ brew cask uninstall julia
Error: Cask 'julia' definition is invalid: invalid 'depends_on macos' value: ":lion"

这让我无法使用 brew删除由木桶安装的文件或撤消木桶安装过程所做的其他更改。

如何手动移除木桶,并反转安装时的范围?
$ brew cask info julia
julia: 1.1.0
https://julialang.org/
/usr/local/Caskroom/julia/0.5.0 (64B)
From: https://github.com/Homebrew/homebrew-cask/blob/master/Casks/julia.rb
==> Name
Julia
==> Artifacts
Julia-1.1.app (App)
/Applications/Julia-1.1.app/Contents/Resources/julia/bin/julia (Binary)

$ brew cask outdated julia
julia (0.5.0) != 1.1.0

brew cask reinstall julia
==> Satisfying dependencies
==> Downloading https://julialang-s3.julialang.org/bin/mac/x64/1.1/julia-1.1.0-mac64.dmg
######################################################################## 100.0%
==> Verifying SHA-256 checksum for Cask 'julia'.
Error: Cask 'julia' definition is invalid: invalid 'depends_on macos' value: ":lion"

最佳答案

我遇到了这个问题,并且能够通过在 https://github.com/Homebrew/homebrew-cask/issues/58046 处运行第一篇文章中的命令来管理它。 -- 即:

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

根据那个帖子:

This will remove all depends_on macos references of installed casks (where it doesn’t matter anymore anyway).

关于homebrew-cask - 如何手动卸载 Homebrew 桶?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56011009/

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