After downloading software and launching it, sometimes you’ll get a warning that says “Software is damaged. Please move it to the trash.” This is a warning from your system to stop you from opening some software. However, it does not mean that the software is damaged.
Why does your system sometimes say this? Let me try and keep this simple.
The warning comes from something called Gatekeeper. Gatekeeper is designed to stop you from opening any software that Apple has not checked and verified. It’s a security feature to “keep you safe”. But when you download and launch software that has been changed (for example, software), it’s no longer “verified”. Your system sees this and says “No, you can’t do that. You should put it in the trash.” In other words, the system is saying “this is not safe”. However, we know that the system is wrong in this case.
How do you fix this “safety” feature? Go to System Preferences > Security & Privacy > General. In the lower part of the windows, you’ll see Allow apps downloaded from: followed by three buttons. To stop your system from saying “No! You can’t do that!” , you have to click the small lock icon on the lower left of the window, enter your system log-in password, and then check Anywhere. However, you should generally not leave Anywhere checked, just in case…
What is Gatekeeper: About Gatekeeper (Apple Support info)
If you want to permanently Disable Gatekeeper in El Capitan:
In an update to El Capitan, Apple introduced a feature to Gatekeeper where if you set your Preference to Anywhere, after 30 days Gatekeeper would re-enable itself. That means that you’ll start seeing the “damaged software” message again. As always there is a terminal command to get around this to permanently disable Gatekeeper.
To Disable Permanently
Type: sudo defaults write /Library/Preferences/com.apple.security GKAutoRearm -bool NO Press: <Return> Enter your password. The cursor will not move. There will be no feedback. Press: <Return>
Note: you only have to enter the sudo command and password the once for each session
Type: defaults write /Library/Preferences/com.apple.security GKAutoRearm -bool YES
At the end of running any terminal commands, it’s always a good idea to end your session before quitting the terminal
Type: exit Press <Return> You will then get a verification and you can quit Terminal
In later operating systems the Allow Applications Download from Anywhere was totally removed from System Preferences.
To Temporally bypass Gatekeeper:
Right click /Control Click on the application icon to open the contextual menu and select Open
How to Enable Applications from Anywhere in Gatekeeper:
Type: sudo spctl --master-disable Press: <Return> Enter your password. The cursor will not move. There will be no feedback. Press: <Return>
Note: you only have to enter the sudo command and password the once for the session
spctl --master-enable Press <Return>
To check Gatekeeper status
Type: spctl --status Press: <Return> This will report back with either assessments disabled or enabled
Relaunch System Preferences and go to Security & Privacy>General and you should see the Anywhere option.
If the application has already been Quarantined by Gatekeeper then it will require the Quarantine flag to be removed first before installing again. Thanks to @charlien you can download and run an Automater Action that runs an AppleScript to remove the quarantine flag
Read More: De quarantine Service