与 macOS Sierra 中的 AppTranslocation 相关的错误

Error Relating to AppTranslocation in macOS Sierra

macOS Sierra 中的 Gatekeeper 似乎有点挑剔。无论如何,它导致我几年前制作的一个小实用程序抛出一个相当烦人的错误。

由于我还没有时间深入研究 Sierra 的幕后变化,所以我不确定如何修复该错误。有没有人有处理与 AppTranslocation 相关的错误并修复它们的经验?

代码和错误如下:

代码:

tell application "Finder"
set currentDir to POSIX path of ((container of (path to me)) as text)
end tell
set currentDir to quoted form of currentDir
set lib80211 to quoted form of "AirPort Utility 5.6.1 Launcher.app/Contents/Resources/Apple80211.framework/Versions/A/Apple80211"

do shell script "export DYLD_INSERT_LIBRARIES=" & currentDir & lib80211 & "
cd " & currentDir & "AirPort\ Utility\ 5.6.1.app/Contents/MacOS
./AirPort\ Utility"

错误:

sh: line 1: cd: /private/var/folders/t4/7k5z832d2tjd4xpzvvq43n4m0000gn/T/AppTranslocation/23AF67A4-3DF7-4982-A1A3-B019CDACB4C2/dAirPort Utility 5.6.1.app/Contents/MacOS: No such file or directory
sh: line 2: ./AirPort Utility: No such file or directory (127)

您必须再次从开发网站下载 Airport Utility Launcher,因为当您安装 macOS Sierra 时,它会删除 Airport Utility 5.6.1。这就是为什么您必须从网站下载整个文件夹的原因:http://zcs.zyniker.org/airport-utility-v5-6-1/

希望对您有所帮助。

好吧,经过相当多的反复试验(以及一些关于 AppTranslocation 在 macOS 10.12 Sierra 中的工作原理的阅读),我发现了一个修复方法。

本质上,您必须打开 *.dmg,然后将内容移动到 Finder 中的其他文件夹。问题:如果您同时移动两者,AppTranslocation 可能 'tag' 它们(看似永久)并继续 运行 每次 尝试启动 *.app) ;这似乎是一个错误,我打算将其报告给 Apple。

解决方案

重新下载 *.dmg(如其他人所述)将其中包含的两个文件一次一个移动到一个文件夹(最好是 Utilities,但这取决于您希望它们驻留的位置)。完成此操作后,运行 启动器和一切都应该像以前一样工作。