【问题标题】:MAC + git gui -> version conflict for package "Tcl": have 8.5.9, need 8.6MAC + git gui -> 包“Tcl”的版本冲突:有 8.5.9,需要 8.6
【发布时间】:2020-05-10 11:46:10
【问题描述】:

当我从终端单击git gui 时出现此错误:

version conflict for package "Tcl": have 8.5.9, need 8.6

你能帮我解决这个问题吗? (使用mac)

【问题讨论】:

  • 我在回答中提到的问题已关闭(并已修复)。

标签: git macos


【解决方案1】:

安装 ActiveState tcltk 8.6.9 并从源代码编译为我解决了它(MacOs 10.15):

brew reinstall git -s

【讨论】:

    【解决方案2】:

    这看起来像Homebrew/homebrew-core issue 49122

    在 Mac 10.14 上,在我上次 brew 更新后,我运行 git gui 时最新的 git (2.5.0) 失败:

    version conflict for package "Tcl": have 8.5.9, need 8.6
    

    我尝试安装 tcl-tk(它确实安装了 8.6)但它没有解决问题,所以我假设 git 不使用 brew 安装的版本。

    可能的修复:Homebrew/homebrew-core PR 49136

    由于 Git 的 tcl-tk 依赖项不被认为是可接受的,因此此更改 将 gitkgit-gui 工具移动到新公式并设置 NO_TCLTK 构建 Git 时标记。

    此外,此更改确保我们不再安装 .app for git-gui.
    相反,我们使用homebrew-installed tcl-tk wish 二进制文件来运行 git-guigitk

    3 天后,Mike McQuaid 刚刚接受了来自Alexander Richardson 的修复,问题现已关闭。

    Homebrew/homebrew-core commit dfa3ccf

    git-gui:从git 公式中拆分出来。

    由于 Git 的 tcl-tk 依赖项不可接受,因此此更改将 gitkgit-gui 工具移至新公式并设置 NO_TCLTK 构建 Git 时标记。

    此外,此更改确保我们不再为 git-gui 安装 .app
    相反,我们使用自制安装的tcl-tkwish 二进制文件来运行git-guigitk

    如果没有这个改变,git-gui 显示的所有对话框都是空白窗口,只能通过记住按钮的位置来关闭。

    【讨论】:

    • 我需要重新安装 git -s 然后它对我有用
    【解决方案3】:

    (重新)从自制软件安装 tcl-tkgit-gui

    brew reinstall git-gui tcl-tk
    

    对于tcl-tk brew 将显示以下消息:

    ==> Caveats
    tcl-tk is keg-only, which means it was not symlinked into /usr/local,
    because macOS already provides this software and installing 
    another version in parallel can cause all kinds of trouble.
    
    If you need to have tcl-tk first in your PATH run:
    echo 'export PATH="/usr/local/opt/tcl-tk/bin:$PATH"' >> ~/.zshrc```
    

    按照brew 的建议,将export... 行添加到您的~/.zshrc(或~/.bashrc,如果这是您的默认shell)。

    重新启动 shell 后,git-gui 应该可以正常工作。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2023-03-31
      • 2017-05-03
      • 2021-09-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-01-15
      相关资源
      最近更新 更多