brew 不知道出啥问题了,大佬帮忙看看 - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
haokuderen
V2EX    macOS

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

  •  
  •   haokuderen 2021-04-28 10:58:22 +08:00 4601 次点击
    这是一个创建于 1634 天前的主题,其中的信息可能已经有所发展或是发生改变。
    问题:
    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
    10 条回复    2021-05-31 12:08:07 +08:00
    StanLin
        1
    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
        2
    IgniteWhite  
       2021-04-28 17:21:56 +08:00 via iPhone
    一般是 Cask 维护者把 rb 脚本没写对,去 homebrew-cask 提个 issue
    haokuderen
        3
    haokuderen  
    OP
       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
        4
    haokuderen  
    OP
       2021-04-28 17:26:24 +08:00
    @IgniteWhite 试了人家 母鸡-_-
    IgniteWhite
        5
    IgniteWhite  
       2021-04-28 17:41:06 +08:00 via iPhone
    brew docker 是想写 brew doctor?

    有点奇怪,因为 https://github.com/Homebrew/homebrew-cask/blob/HEAD/Casks/gtkwave.rb 里面没看到有 x11 dependence 相关的 key 。你贴一下 brew info gtkwave 的输出?
    haokuderen
        6
    haokuderen  
    OP
       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
        7
    haokuderen  
    OP
       2021-04-28 18:10:07 +08:00
    @IgniteWhite 我把整个 casks 文件夹替换成 github 下载下来的文件,问题就好了,十分感谢
    IgniteWhite
        8
    IgniteWhite  
       2021-04-28 18:32:53 +08:00
    @haokuderen 开心!我最近因为需要用一些老版本的 cask 就自己维护了一个 tap,稍微了解了一点 brew 文件的用法。能帮你解决问题获得了一点成就感,哈哈
    IgniteWhite
        9
    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
        10
    konyeth  
       2021-05-31 12:08:07 +08:00
    cd /usr/local/Caskroom/
    rm -rf wireshark/
    brew cask install wireshark

    replace wireshark with gtkwave
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     2494 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 43ms UTC 10:46 PVG 18:46 LAX 03:46 JFK 06:46
    Do have faith in what you're doing.
    ubao msn snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86