JiFu's Wiki JiFu's Wiki
首页
  • HTML
  • JavaScript
  • NodeJS
  • Vuejs
  • 微信小程序
  • Python
  • 数据库
  • 中间件
  • 算法
  • 软件工程
  • Wordpress
  • iOS开发
  • Android开发
  • Linux
  • Windows
  • MacOS
  • Docker
  • Vim
  • VSCode
  • Office
  • 其他
  • Photoshop
  • Sketch
  • Mac
  • 游戏
关于
  • 分类
  • 标签
  • 归档
GitHub (opens new window)
首页
  • HTML
  • JavaScript
  • NodeJS
  • Vuejs
  • 微信小程序
  • Python
  • 数据库
  • 中间件
  • 算法
  • 软件工程
  • Wordpress
  • iOS开发
  • Android开发
  • Linux
  • Windows
  • MacOS
  • Docker
  • Vim
  • VSCode
  • Office
  • 其他
  • Photoshop
  • Sketch
  • Mac
  • 游戏
关于
  • 分类
  • 标签
  • 归档
GitHub (opens new window)
  • DevOps介绍
  • Linux

  • MacOS

    • MacOS介绍
    • MacOS 如何提高 PDF 的对比度?
    • Charles从入门到精通
    • Compiling PyQt5 for Python 2.7 on MacOS
    • Homebrew让你从Mac切换到Linux更轻松
    • Mac OS X设置SMB进行文件共享
    • Mac OS系统加速:干掉那些「炫酷」的动画
    • Mac 时间机器 Time Machine 备份速度太慢的解决方法 (加速备份命令)
    • macOS 下 FFmpeg 视频转码入门及进阶使用心得
    • Mac定时任务-利用launchctl定时启动任务
    • Mac的最大连接数限制和端口的相关参数的设置
    • Mac重置系统管理控制器SMC
    • Mac高效使用技巧
    • MacOS一个惊人快速的终端录像工具
    • 一览Mac OS 图形界面的发展史
    • 修复Mac破解应用开打时闪退
    • 在M1芯片Mac上使用Homebrew
    • 如何查看 macOS 系统日志
    • 如何重置Mac上的NVRAM
    • 强制退出Mac程序的六种方法
    • 苹果 Mac 重置 SMC、NVRAM、PRAM 方法教程 - 解决 macOS 卡顿或无法启动
    • 苹果M1芯片Macbook安装win10
    • 解决“Mac应用”已损坏,无法打开的问题
      • 使用命令行打开设置选项
      • 修改系统配置
    • 解决Mac修改DNS卡死-命令行修改Mac OS系统DNS设置
    • MacOS Photoshop屏蔽正版验证
    • 26.Karabiner自定义组合快捷键
    • MacOS软件推荐
    • Disable notification "to get future google chrome updates you'll need macos 10.13 or later" on mac
  • Windows

  • Docker

  • Vim

  • VSCode

  • Office

  • 其他

  • 运维
  • MacOS
JiFu
2023-10-18
目录

解决“Mac应用”已损坏,无法打开的问题

# 问题描述

在Mac下安装一些软件时提示"来自身份不明开发者",其实这是Mac新系统启用了新的安全机制。 默认只信任 Mac App Store 下载的软件和拥有开发者 ID 签名的应用程序。 换句话说就是 Mac 系统默认只能安装靠谱渠道(有苹果审核的 Mac App Store)下载的软件或被认可的人开发的软件。

这当然是为了用户不会稀里糊涂安装流氓软件中招,但没有开发者签名的 “老实软件” 也受影响了,安装就会弹出下图所示警告框:“xxx已损坏,打不开。您应将它移到废纸篓”或者“打不开 xxx,因为它来自身份不明的开发者”。

# 方案1: 开放系统安装来源

# 使用命令行打开设置选项

macOS Sierra 10.12及以上系统默认是不开启这个设置选项,需要通过命令行手动显示。

在终端内执行sudo spctl --master-disable

# 修改系统配置

修改系统配置:系统偏好设置... -> 安全性与隐私。

# 系统偏好设置

# 安全性与隐私

# 认证

# 修改未任意来源

# 方案2: 使用xattr命令修复App权限

Use xattr on the App Throwing the Damaged Error This is sort of a last resort and is only recommended for advanced Mac users. Generally speaking if the app is still throwing a ‘damaged’ error message you might want to not use it. Use this at your own risk.

With the command line you can use xattr to view and remove extended attributes from a file on the Mac including the application throwing the “Appname.app is damaged and can’t be opened. You should move it to the Trash.” error message.

Launch Terminal and then issue the following command:

xattr -cr /path/to/application.app
1

For example:

xattr -cr /Applications/Signal.app
1

The -c flag removes all attributes, whereas -r applies recursively for the entire targeted .app directory contents.

The xattr command can also be used to remove the ‘application downloaded from the internet’ error message on the Mac too. Again this is only recommended to advanced users because modifying extended attributes may have unintended consequences, and again you might be attempting to run an app that you should not be running, either for stability, privacy, security, or other reasons.

Did the tricks above work to resolve the “Appname.app is damaged and can’t be opened. You should move it to the Trash.” error on the Mac for you? Do you know of another workaround or solution to resolving this error message? Share with us in the comments!

上次更新: 2024/08/11, 01:59:03
苹果M1芯片Macbook安装win10
解决Mac修改DNS卡死-命令行修改Mac OS系统DNS设置

← 苹果M1芯片Macbook安装win10 解决Mac修改DNS卡死-命令行修改Mac OS系统DNS设置→

最近更新
01
WPS快捷键
05-21
02
Disable notification "to get future google chrome updates you'll need macos 10.13 or later" on mac
05-14
03
MacOS软件推荐
04-30
更多文章>
Theme by Vdoing | Copyright © 2019-2025 Ji Fu | MIT License
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式