cygwin升级到1.7后,git gui和gitk报错

将 cygwin升级到1.7以后,使用git gui或者gitk的时候,会出现下面的错误提示:

Application initialization failed: no display name and no $DISPLAY environment variable
Error in startup script: invalid command name “tk_messageBox”
while executing
“tk_messageBox -icon error -type ok -title “git-gui: fatal error” -message $err”
invoked from within
“if {[catch {package require Tcl 8.4} err]
|| [catch {package require Tk 8.4} err]
} {
catch {wm withdraw .}
tk_messageBox \
-icon error \
-typ…”
(file “/usr/lib/git-core/git-gui” line 34)

解决办法:

1. 运行cygwin的安装程序,安装 Xorg Server 和Xinit

2. 运行cygwin,输入startx

3. 运行gitk或者git gui

 

你可能感兴趣的:(cygwin升级到1.7后,git gui和gitk报错)