This is the most common mistake for people who are new to macOS and install apps for macOS themselves.
Before, you had to turn on Anywhere in the System Preferences under Security & Privacy to be able to install external applications, but if you install completely, from Mac OS Sierra 10.12 onwards, this option is hidden.
How to disable Gatekeeper (Turn on the Anywhere option) fixes the error “damaged and can’t be opened. You should move it to the Trash ”
1. Quit out of System Preferences
2. Open the Terminal app and then enter the following command syntax:
sudo spctl --master-disable
3. Hit return and authenticate with an admin password
If you feel like confirming this, enter this command syntax:
If report back “assessments disabled” to indicate that Gatekeeper has been turned off.
4. Relaunch System Preferences and go to “Security & Privacy” and the “General” tab
5. You will now see the “Anywhere” option under “Allow apps downloaded from:” Gatekeeper options
You’ll now be able to open and launch apps from anywhere under macOS Mojave, HighSierra, and Sierra.
Conversely, if you don’t want to display the Anywhere option, just copy this command and enter it into Terminal.
sudo spctl --master-enable
Method 2: This method uses the created CMD file for you who are lazy to work with Terminal
1. Download this file: Gatekeeper_tool.dmg
2. Click on the downloaded file, run GateKeeper_Tool.command
3. Select the line you need to use. If you want to disable Gatekeeper, you input 1 -> Enter -> Then enter the password
Done! enjoy it.