macOS无法打开app应用程序的解决办法

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.

Golang runtime error with macOS Sierra

Golang runtime error with macOS Sierra

If you are on Golang 1.6 or older, you may meet a panic error when you try to build or test your programme or anything else related with runtime:

fatal error: unexpected signal during runtime execution

There is a post about the issue in golang-nuts: [https://groups.google.com/forum/#!topic/golang-nuts/XaVT6fi1g30]. The bug is fixed in Golang 1.7, so just upgrade to 1.7 and you will be happy.