gitk无法在macOS 10.14(Mojave)上启动

时间:2019-04-23 10:17:36

标签: git macos macos-mojave gitk

当我尝试在macOS Mojave(10.14.4)上运行gitk时出现以下错误:

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)

我已经尝试过解决似乎与启动gitk类似的问题的解决方案(重新启动SystemEvents,检查旧的.osax脚本添加项,从自制软件重新安装git等),但是没有运气。我还检查了终端是否有权访问系统事件。谷歌搜索错误消息似乎没有发现任何相关内容。

gitk在我以前的macOS版本上一直非常适合我。

1 个答案:

答案 0 :(得分:3)

这似乎与Git或gitk无关,因为过去存在相同的错误:

最后一个包括:

  

与他人进行理智检查,显然有/System/Library/DTDs/sdef.dtd在他们身边。
  我已经有了文件的副本,并且appledoc现在可以像宣传的那样工作

因此,首先要检查该文件是否存在,以及是否可以从在其他Mac 10.14上获得的副本中替换,则可以排除导致此问题的特定原因。

Op Paul R确认in the comments

  

回到Time Machine备份,看来sdef.dtd在2019年3月下旬的某个时候莫名其妙地消失了。

     

我从备份中还原了它(讽刺的是,必须这样做才能禁用系统完整性保护(SIP)-您会以为SIP首先会阻止这种情况发生?),现在一切都很好了。