8

When starting gitk command line getting the error. It's strange because I have newest version of Mac OS 11.1 I just upgraded git but it doesn't helped. Any ideas what to do?

macOS 11 or later required !
/usr/bin/wish: line 2: 50965 Abort trap: 6           "$(dirname $0)/../../System/Library/Frameworks/Tk.framework/Versions/8.5/Resources/Wish.app/Contents/MacOS/Wish" "$@"```

  • 1
    Your Mac has mismatched versions of the OS and the `wish` command. Why that is the case is a mystery to me, but the problem isn't Git, it's with the installed `wish` vs the installed Tcl/Tk. (Since `wish` is *part of* the tcl/tk system, they're not supposed to get out of sync.) – torek Dec 17 '20 at 06:05
  • 2
    I running `brew install tcl` then it's working now. Thanks – Hania Urbaniak Dec 17 '20 at 11:23

3 Answers3

19

Solved it by running brew install tcl

Cherpak Evgeny
  • 2,659
  • 22
  • 29
2

I have seen the most popular answer:

Solved it by running brew install tcl

But after I done this, gitk still not work, I have two versions of wish installed:

$ type -a wish
$ wish is /usr/local/bin/wish
$ wish is /usr/bin/wish

Finally I found my solution: I edit my .zshrc file, add alias for gitk:

alias gitk="/usr/local/bin/wish $(which gitk)"
LiuJQ
  • 839
  • 6
  • 10
0

LiuJQ's solution works. It's indeed the wish problem. I fixed by adding alias for gitk by adding the following line in ~/.bashrc.

alias gitk="/usr/local/bin/wish $(which gitk)"

Note: you need to reopen the terminal for this to take effect.