当我尝试在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等),但没有运气。我还检查过终端是否有权访问系统事件。谷歌搜索错误消息似乎没有发现任何相关的。
在以前版本的macOS上,gitk一直对我很有用。
这似乎与Git或gitk
无关,因为过去曾出现同样的错误:
最后一个包括:
理智的
/System/Library/DTDs/sdef.dtd
与他人一起检查是否适合他们。 我有一份文件的副本,appledoc现在可以像宣传的那样工作
因此,首先检查该文件是否存在,以及是否可以从另一台Mac 10.14上获得的副本替换,这将排除此问题的特定原因。
通过Time Machine备份,似乎
sdef.dtd
在2019年3月下旬莫名其妙地消失了。我从备份中恢复了它(具有讽刺意味的是必须禁用系统完整性保护(SIP)才能做到这一点 - 你会认为SIP会阻止这种事情发生在一开始吗?)现在一切都很好。