“The application XXX can’t be opened” on Mac OS X

If you are trying to launch an app on OS X and simply get the error “The application XXX can’t be opened”, the problem could be the actual executable file in the app bundle does not have corresponding permissions.

To fix the issue:

  1. Open a Terminal and enter into your app bundle. You can just type “cd
    and then drag the app into the Terminal and then hit the enter.
  2. cd Contents/MacOS
  3. chmod +x * or chmod +x <FILENAME> if you know which one is the actual executable.
  4. sudo !! may be needed if you don’t have permissions to execute step 3.

Now try to launch the app again, and the problem should be solved.

Install Apps from 3rd party in macOS Sierra

When installed apps from 3rd party or Internet download, macOS always prompt “Downloaded .app is damaged and can’t be opened”.

The solution is really simple:

Run the following command before launching the app:

sudo spctl --master-disable

Launching the app and finish installing it, and then run the following command to re-enable the restriction:

sudo spctl --master-enable

That’s it.