Friends who are new to macOS or running the App after updating a certain system version will be prompted with the message [xxx is damaged],Can't open,You should move it to the Trash Solution]、【Cannot open xxx,Because it comes from an unidentified developer],【Cannot open xxxx,Because Apple can't check whether it contains malware] and other tips,Below I will teach you how to fix it。
Several common errors
- xxx is damaged,Can't open,You should move it to Trash solution
- Can't open xxx,Because it comes from an unidentified developer
- Can't open xxxx,Because Apple can't check it for malware
- When installing, it prompts that the loading failed!
Why does it happen?
This is a problem with new security mechanisms enabled in macOS。
By default, Apple only allows the installation of apps from its own [App Store].,If you want to install third-party applications,Then you need to go to [System Preferences -> Security & Privacy -> Select the [App Store and Recognized Developers] option in General。Approved developers need to purchase Apple’s enterprise certificate to sign their applications.,Then submit it to Apple for review,This is very unrealistic for cracking applications,Because cracking the application will definitely modify the application's files, causing the signature to become invalid and the running display will be "Corrupted"。In addition, some open source free applications have no income (it is too difficult for users to actively reward),Therefore, developers generally do not purchase certificate signatures.。
The solution is to enable the [Any Source] option.,However, macOS hides this setting by default.,The user needs to manually execute the command line code through the terminal to enable it.。
Let’s teach you how to use command line code to open any hidden source options.。
Open any source (primary)
Open first 系统偏好设置 -> 安全与隐私 -> 通用 tab,Check if it is enabled 任何来源 Options。
If this option is not available,Copy the following command:
sudo spctl --master-disable
Open终端:
Paste the command you just copied into the terminal。
Then press the return key on the keyboard (return)
Enter password
Congratulations,您已成功开启任何来源。
However, some applications still do not work even if any source is enabled.,This comes as Apple further shrinks permissions for unsigned apps,At this time, you need to execute the command line code through the terminal to bypass the application signature authentication.。Let’s teach you how to bypass Apple’s notarization Gatekeeper through commands.。
Bypass Notarization (Extended)
Open terminal,Enter the following command:
sudo xattr -rd com.apple.quarantine /Applications/xxxxxx.app
Change the above xxxxxx.Replace app with your App name,for example Sketch.app
sudo xattr -rd com.apple.quarantine /Applications/Sketch.app
Or copy and paste the following command into the terminal
sudo xattr -rd com.apple.quarantine
Open Finder,Click on the left 应用程序,Drag the application into the terminal,Then press the return key on the keyboard (return),Enter password,Press the Enter key again,Finish。
Notice quarantine There must be a space after
Okay, let’s see if we can open the APP again! Here in general 90% All applications can be installed and run。
If it still doesn't work,Then you need to perform local signing operation on the application!
Application signature (extension)
- Install Command Line Tools tool
Open the terminal tool and enter the following command:
xcode-select --install
- When the installation window pops up, select
继续安装,The installation process takes a few minutes,Please wait。If it prompts "The software cannot be installed" during installation,Because it is currently unavailable from the software update server",Please follow this tutorial:macOS “The software cannot be installed,Because it is currently unavailable from the software update server" Workaround - Open the terminal tool, enter and execute the following command to sign the application:
sudo codesign --force --deep --sign - (应用路径)
application path:Open Finder,Click on the left navigation bar
应用程序,Find relevant apps,Drag it into the terminal command-behind,Then press enter,Pay attention to the last one-There is a space after。
Normally there is only one line of prompts,Success:
/文件位置 : replacing existing signature
If you encounter the following error:
/文件位置 : replacing existing signature
/文件位置 : resource fork,Finder information,or similar detritus not allowed
- Execute in terminal first:
xattr -cr /文件位置(直接将应用拖进去即可)
- Then execute the following command again:
codesign --force --deep --sign - /文件位置(直接将应用拖进去即可)

Comments (0)