sudo spctl --master-disable
然后打开系统设置,选择"任何来源"
open -a "System Preferences" /System/Library/PreferencePanes/Security.prefPane

如果还是不行
sudo xattr -r -d com.apple.quarantine /Applications/my.app
/Applications/my.app 替换为自己的 app 路径,一般在/Applications 下面,可以通过访达拖拽 app 到终端窗口实现自动输入