
在 macOS 上打开 0 A.D. 时,系统弹出提示说文件"已损坏,无法打开",但我刚刚从官网下载的,请问如何解决?
通过浏览器下载时,文件会被添加 com.apple.quarantine 属性,触发 macOS Gatekeeper。这本质上同样是因为 0 A.D. 未使用开发者 Apple ID 签名。
解决方法:使用 macOS 内置的 xattr 工具手动移除扩展属性。打开终端,输入以下命令:
xattr -rc /Applications/0\ A.D..app
[!NOTE]
如果使用curl --remote-name <URL>或wget <URL>下载文件,则不会添加此属性,也就不会出现该问题。