The solution to the mac installation application prompt is damaged

I recently upgraded my mac os to Monterey. The new version of the system is very easy to use, but I also encountered many problems when reinstalling the application. The most common one is that the application is damaged and cannot be opened. uploaded and downloaded.
This article introduces two methods to solve this problem, both of which came out of the pit, and took some time to organize them into articles, hoping to help colleagues who encounter the same problem.

Prompt for a broken solution

The higher version mac system may prompt that the software is damaged and cannot be opened.
insert image description here
The solution is as follows

1. The solution to the problem that the new system of 10.15 and above shows that the application is damaged and cannot be opened

Open the terminal and enter the following command

sudo xattr -r -d com.apple.quarantine {
    
    application}

Open the "Applications" directory through "Finder", find navicat and drag it to the command line. The complete command is as follows:

sudo xattr -r -d com.apple.quarantine /Applications/Navicat\ Premium.app

Hit Enter to execute.

If this method still does not work, you can try the next method.

2、sudo spctl --master-disable

The reason for the new system to open the application prompt is broken: In order to strengthen the security mechanism, the new system does not allow users to download and install applications by default, and can only install applications from the Mac App Store.
However, this problem can also be solved by disabling system policy control.
Open the terminal and execute the following command:

sudo spctl --master-disable

Open System Preferences > Security and Privacy, display any source, which means that the system will not restrict the normal operation of applications downloaded and installed by users themselves.
insert image description here

If there is still a prompt that the "xxxx" application cannot be opened, you can click the button "Open anyway" in the above interface to run normally.

If you want to re-enable System Policy Control, by executing the following command:

sudo spctl --master-enable

reference

What should I do if the Mac prompts that the application is damaged when I open the application? [Detailed explanation] [
One-line command] sudo spctl --master-disable
The spctl command of UNIX

Guess you like

Origin blog.csdn.net/Mr_rain/article/details/125998016