Often times we run applications on our system that are not signed correctly or in some cases, just old. For Windows users, they often just get a warning along with an option to run the application anyway. However, that is not the case when it comes to Mac systems. When you try to run an application that is either not digitally signed correctly or other software that is developed by the community for different purposes, you might get the “Application.app is damaged and can’t be opened” error message.
The reason this error message occurs is pretty obvious. macOS has a specific security feature that checks the applications that you wish to run and then depending on the code signing, allows the application to be executed. However, in some scenarios, when the app you wish to run is an old and unsigned version, you are thrown the said error message as Gatekeeper does not allow it to run. The app is treated as unsafe and thus you are suggested to delete it.
Now, this might be really helpful in most of the cases but there are apps that are trusted and they are detected as unsafe by the Gatekeeper security feature. In such a case, to overcome the problem, what you will have to do is either change your System Preferences, run the application using the xattr command, or disable Gatekeeper for a while altogether. With that said, let us get into the various methods that’ll help resolve the issue.
Method 1: Run the App From a Terminal Window
As it turns out, if you run the same application from a terminal window using superuser permissions, it will run without any issues. Basically the superuser permissions will override the Gatekeeper feature and thus the application will be allowed to execute. You should do this only and only if you trust the application that you wish to run completely. Doing this for any random app you got off of the internet is not a good idea. With that said, follow the below instructions run the app:
- First of all, open up a Terminal window by going to Finder > Go > Utilities.
- From there, locate and open up a Terminal.
- Once the terminal window is up, use the following command to run the application:
sudo xattr -cr /path/to/application.app
- A neat little trick here would be to just navigate to the directory where the app is located and then dragging and dropping it to the terminal window. That will automatically paste the path of the application.
- Once you have done that, just write sudo xattr -cr in front of the path and then hit Enter.
- You will be asked for your admin password, provide that, and press Enter again.
- The app should run now.
Method 2: Disable Checks Temporarily
Another way that you can get rid of the error message is to disable global checks temporarily. As we have mentioned above, the Gatekeeper is a security feature in macOS that essentially checks the apps that you wish to run and protects your system from malware. As it turns out, in some cases it treats certain apps unsigned apps that you downloaded as unsafe. That is why you receive the said error message. Therefore, the easy workaround here is to just disable the feature temporarily and then turn it on again. Here’s how to do it:
- To disable Gatekeeper, you first have to open up a Terminal window on your Mac device.
- You can do so via Finder > Go > Utilities or just simply searching for it in the Spotlight.
- Once the Terminal has launched, execute the following command to disable checks:
sudo spctl --master-disable
- Provide your admin password to complete the execution.
- Once you have done that, go ahead and run the application.
- It is important that you enable the checks again after you have used the application.
- To do this, run the following command:
sudo spctl --master-enable
Method 3: Allow Apps from Anywhere
You can also allow apps from anywhere to run without any issues from the macOS System Preferences. This is where Gatekeeper settings are located and you will just have to edit them to allow all apps to execute. To do this, follow the instructions provided down below:
- First of all, open up the System Preferences window on your Mac.
- Then, on the System Preferences screen, go to Security & Privacy.
- On the General tab of Security & Privacy, click the lock icon to unlock some of the options.
- You will be asked for your admin password. Provide it and then press Enter.
- Then, under “Allow applications downloaded from“, choose the Anywhere option.
- Finally, click the lock icon again to save the changes.
- Once you have done that, run the application.
- Make sure to change the setting back to default once you have launched the application. You won’t need it in the future for the same app.
Method 4: Grant Permissions
In some scenarios, the issue can appear due to permission restrictions. If you try to run a file that does not have executable permissions, you are likely to get the said error message. In such a case, what you have to do is grant it the required permissions and then try running it. To do this, follow the instructions down below:
- First of all, open up a Terminal window on your Mac. Type sudo chmod +x in the Terminal window but do not hit Enter.
- Then, navigate to the application, right-click on it and then choose Show Package Contents.
- There, navigate to Contents > MacOS.
- From there, find the file with the application name and no extension. In case there’s only one file, just drag and drop it in the terminal window.
- Now, the command should look something like this:
sudo chmod +x /path/to/application
- Finally, press Enter to run the command. Provide the admin password.
- Then, run the application and see if that resolves the issue.