Gatekeeper is a security feature of the macOS operating system. It verifies that only trusted software runs on your Mac.
And if the software being launched has been changed, the user will receive a message about corruption…
It is impossible to launch a damaged application without disabling the Gatekeeper function or bypassing the Quarantine function (usually the procedure is called Dequarantine or de-quarantine).
Solution 1: Automatic script.
Use the Auto Fix script for an automatic solution. It can be downloaded via this link
Solution 2: Dequarantine.
This option will allow you to bypass Quarantine for a specific application. Note that the command includes the path to the application, or image (.dmg).”
1. Launch the Terminal utility. This is a standard utility that does not need to be installed additionally. The terminal can be found through Spotlight.
2. Use the command: sudo xattr -r -c Enter a space and drag the damaged program into the Terminal window. The team will add it. Important!
The command does not affect files in the image (.dmg). It is necessary to copy the damaged program, for example, to the desktop, and apply the command to it.
In some cases, the command can be applied to the image (.dmg) before mounting.
3. Press Enter and enter the Administrator password. The password is not displayed when entered into the Terminal, but is entered. If a password is not specified, create one.
4. Proceed to launch the damaged program. Wait for the verification to complete and you will be able to Open it. The verification time can take up to 30 minutes.
Solution 3: Disable Gatekeeper.
This command will allow you to disable Gatekeeper, i.e. restore settings that allow the use of programs downloaded from Any source in System Settings / Protection and Security.
1. Launch the Terminal utility and run the command
For macOS 10.12 – 10.15.7
sudo spctl --master-disable
For macOS 11 and later
sudo spctl --global-disable
2. Press Enter and enter the Administrator password.
2.1 For macOS Sequoia, the terminal utility will display a message that you need to confirm the operation in system settings.
2.2 Open system settings, go to the “Privacy and Security” section, find the “Security” subsection below, change the “Allow applications from” value to “Any source”.
2.3 Enter the password for your Mac, the password you use when logging in.
2.4 Confirm the change by clicking on the “Allow from everywhere” button.
3. Proceed to launch the damaged program.
Solution 4: Manual unlocking via “Privacy and Security”.
For example, when you open a program, game or file, you are greeted with a window with the following content:
• Open System Preferences.
• Go to the “Privacy and Security” section.
• Find the “Security” subsection.
• You will see a message like this: “The ‘Fix’ file is locked to protect your Mac.” — click the button on the right “Open anyway.”
• You will be asked to enter your Mac’s password (the same one you used when logging in).
• A new window will appear asking if you are sure you want to open the program, game or file. Click “Open Anyway.”
Done! Your program, game or file will be opened.
*Example:*
You can read more about Gatekeeper at support.apple.com or wikipedia.org) or developer.apple.com
You can read more about extended attributes and the xattr command at wikipedia.org or real-world-systems.com or ss64.com
