macOS Sierra以后(EI Capitan, High Sierra),默认只允许打开来自Mac App Store或苹果的有效开发者发布的应用。你可以在「System Preferences -> Security & Privacy」查看当前状态:
如果是从网络下载安装的app,在打开时可能会遇到这两个问题:
- YOUR_APP is from an unidentified developer, Are you sure you want to open is?
- YOUR_APP is damaged and can’t be opened. You should move it to the Trash.
可以尝试在终端中执行sudo spctl --master-disable
(需要输入密码)以允许打开任意来源的app:
如果执行成功,「Anywhere」选项为选中状态。「Security & Privacy」状态如下:
如果需要关闭「Anywhere」选项,则在终端执行sudo spctl --master-disable
.
注:打开该「Anywhere」选项有安全风险,请确保你在打开该选项是了解app的来源,只信任自己清楚来源的app.