gitk fails to launch on macOS 10.14 (Mojave)

删除回忆录丶 提交于 2019-12-06 07:56:43

问题


I get the following error when I try to run gitk on macOS Mojave (10.14.4):

Error in startup script: file:///System/Library/ScriptingDefinitions/CocoaStandard.sdef:2: I/O warning : failed to load external entity "file://localhost/System/Library/DTDs/sdef.dtd"
<!DOCTYPE dictionary SYSTEM "file://localhost/System/Library/DTDs/sdef.dtd">
                                                                            ^
file:///System/Library/PrivateFrameworks/FolderActionsKit.framework/Versions/A/Resources/FolderActions.sdef:2: I/O warning : failed to load external entity "file://localhost/System/Library/DTDs/sdef.dtd"
<!DOCTYPE dictionary SYSTEM "file://localhost/System/Library/DTDs/sdef.dtd">
                                                                            ^
    while executing
"exec osascript -e [format {
        tell application "System Events"
            set frontmost of processes whose unix id is %d to true
        end te..."
    invoked from within
"if {[tk windowingsystem] eq "aqua"} {
    exec osascript -e [format {
        tell application "System Events"
            set frontmost of processes ..."
    (file "/usr/local/bin/gitk" line 12212)

I've tried solutions for seemingly similar reported problems with launching gitk (restart SystemEvents, check for old .osax scripting additions, re-install git from homebrew, etc), but no luck. I've also checked that Terminal has permission to access System Events. Googling the error message doesn't seem to turn up anything relevant.

gitk has always worked perfectly for me on previous versions of macOS.


回答1:


That does not seem linked to Git or gitk, since the same error was ween in the past:

  • in a context of VMware
  • or through Vim
  • in appledoc issue 322

The last one includes:

Sanity checking with others an apparently /System/Library/DTDs/sdef.dtd is there for them.
I've got a copy of the file and appledoc now works as advertised

So start with checking if that file is there, and if you can replace from a copy obtained on a different Mac 10.14, that would rule out that particular cause for this issue.

The Op Paul R confirms in the comments:

going back through Time Machine backups it seems that sdef.dtd inexplicably disappeared some time in late March 2019.

I restored it from backups (ironically had to disable System Integrity Protection (SIP) in order to do this of course - you would think that SIP would prevent this kind of thing happening in the first place ?) and all is good now.



来源:https://stackoverflow.com/questions/55808990/gitk-fails-to-launch-on-macos-10-14-mojave

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!