brew 不知道出啥问题了,大佬帮忙看看

2021-04-28 10:58:22 +08:00
 haokuderen
问题:
brew search go
Error: Cask 'gtkwave' definition is invalid: invalid depends_on key: ':x11'


我已经重新安装了 brew 还是会出现这个问题。



brew config:
HOMEBREW_VERSION: 3.1.3
ORIGIN: https://mirrors.aliyun.com/homebrew/brew.git
HEAD: d89eda09abbeae907eb88bd6d01dc9cde7ff0e19
Last commit: 8 days ago
Core tap ORIGIN: https://mirrors.aliyun.com/homebrew/homebrew-core.git
Core tap HEAD: 58bac2f622d827c05c87c6b1d8df05fda0ae7b4e
Core tap last commit: 2 hours ago
Core tap branch: master
HOMEBREW_PREFIX: /usr/local
HOMEBREW_BOTTLE_DOMAIN: https://mirrors.ustc.edu.cn/homebrew-bottles
HOMEBREW_CASK_OPTS: []
HOMEBREW_MAKE_JOBS: 12
Homebrew Ruby: 2.6.3 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.3_2/bin/ruby
CPU: dodeca-core 64-bit kabylake
Clang: 11.0 build 1103
Git: 2.24.1 => /Library/Developer/CommandLineTools/usr/bin/git
Curl: 7.64.1 => /usr/bin/curl
macOS: 10.15.7-x86_64
CLT: 11.3.0.32.29
Xcode: N/A



brew docker:
Please note that these warnings are just used to help the Homebrew maintainers
with debugging if you file an issue. If everything you use Homebrew for is
working fine: please don't worry or file an issue; just ignore this. Thanks!

Warning: Suspicious https://github.com/Homebrew/brew git origin remote found.
The current git origin is:
https://mirrors.aliyun.com/homebrew/brew.git

With a non-standard origin, Homebrew won't update properly.
You can solve this by setting the origin remote:
git -C "/usr/local/Homebrew" remote set-url origin https://github.com/Homebrew/brew

Warning: A newer Command Line Tools release is available.
Update them from Software Update in System Preferences or run:
softwareupdate --all --install --force

If that doesn't show you any updates, run:
sudo rm -rf /Library/Developer/CommandLineTools
sudo xcode-select --install

Alternatively, manually download them from:
https://developer.apple.com/download/more/.


Warning: Suspicious https://github.com/Homebrew/homebrew-core git origin remote found.
The current git origin is:
https://mirrors.aliyun.com/homebrew/homebrew-core.git

With a non-standard origin, Homebrew won't update properly.
You can solve this by setting the origin remote:
git -C "/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core" remote set-url origin https://github.com/Homebrew/homebrew-core
4030 次点击
所在节点    macOS
10 条回复
StanLin
2021-04-28 11:29:34 +08:00
Removing /usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask/Casks/gtkwave.rb might be a workaround.
IgniteWhite
2021-04-28 17:21:56 +08:00
一般是 Cask 维护者把 rb 脚本没写对,去 homebrew-cask 提个 issue
haokuderen
2021-04-28 17:25:41 +08:00
@StanLin thanks. I try ,but still reminder error that .rb invalid (Cask 'goldendict' definition is invalid)
haokuderen
2021-04-28 17:26:24 +08:00
@IgniteWhite 试了人家 母鸡-_-
IgniteWhite
2021-04-28 17:41:06 +08:00
brew docker 是想写 brew doctor?

有点奇怪,因为 https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/gtkwave.rb 里面没看到有 x11 dependence 相关的 key 。你贴一下 brew info gtkwave 的输出?
haokuderen
2021-04-28 18:02:16 +08:00
是 doctor,docker 用多了哈哈。 发现多了一行 depends_on x11: true


cask "gtkwave" do
version "3.3.107"
sha256 "0024fa80f4566bc053d705200263c7e7d72f2ae111bf670dc6af90403540d3c7"

# downloads.sourceforge.net/gtkwave/ was verified as official when first introduced to the cask
url "https://downloads.sourceforge.net/gtkwave/gtkwave-#{version}-osx-app/gtkwave.zip"
appcast "https://sourceforge.net/projects/gtkwave/rss"
name "GTKWave"
desc "GTK+ based wave viewer"
homepage "https://gtkwave.sourceforge.io/"

depends_on x11: true

app "gtkwave.app"
binary "#{appdir}/gtkwave.app/Contents/Resources/bin/gtkwave_bin_launcher.sh", target: "gtkwave"

zap trash: [
"~/Library/Application Support/CrashReporter/gtkwave-bin_*.plist",
"~/Library/Preferences/com.geda.gtkwave.plist",
"~/Library/Saved Application State/com.geda.gtkwave.savedState",
]

caveats <<~EOS
You may need to install Perl’s Switch module to run #{token}’s command line tool.

https://ughe.github.io/2018/11/06/gtkwave-osx
EOS
end
haokuderen
2021-04-28 18:10:07 +08:00
@IgniteWhite 我把整个 casks 文件夹替换成 github 下载下来的文件,问题就好了,十分感谢
IgniteWhite
2021-04-28 18:32:53 +08:00
@haokuderen 开心!我最近因为需要用一些老版本的 cask 就自己维护了一个 tap,稍微了解了一点 brew 文件的用法。能帮你解决问题获得了一点成就感,哈哈
IgniteWhite
2021-04-28 19:53:15 +08:00
补充一点信息:据我观察,homebrew-cask 里面对 X11 ( XQuartz.app )的依赖(如果该 cask 还有这个依赖的话),从
depends_on x11: true

变成了
depends_on cask: "xquartz"

看来及时 brew update 或者像楼主一样更新,是有必要的
konyeth
2021-05-31 12:08:07 +08:00
cd /usr/local/Caskroom/
rm -rf wireshark/
brew cask install wireshark

replace wireshark with gtkwave

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/773789

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX