问题描述
当我尝试在macOS Mojave(10.14.4)上运行gitk时,出现以下错误:
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)
我已经尝试过解决似乎与启动gitk类似的问题的解决方案(重新启动SystemEvents,检查旧的.osax脚本添加项,从自制软件重新安装git等),但是没有运气.我还检查了终端是否有权访问系统事件.谷歌搜索错误消息似乎没有发现任何相关信息.
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在我以前的macOS版本上一直非常适合我.
gitk has always worked perfectly for me on previous versions of macOS.
推荐答案
这似乎与Git或gitk
无关,因为过去存在相同的错误:
That does not seem linked to Git or gitk
, since the same error was ween in the past:
- 在 VMware的背景下
- 或通过Vim
- 在 appledoc问题322
- in a context of VMware
- or through Vim
- in appledoc issue 322
最后一个包括:
因此,首先要检查该文件是否存在,以及是否可以从在其他Mac 10.14上获得的副本中进行替换,这将排除造成此问题的特定原因.
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.
Op Paul R 确认:
我从备份中还原了它(讽刺的是,必须这样做才能禁用系统完整性保护(SIP)-您会以为SIP首先会阻止这种情况发生?),现在一切都很好了.
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.
这篇关于gitk无法在macOS 10.14(Mojave)上启动的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!