MacOS安装软件后无法启动报错:“已损坏,无法打开,你应该将它移到废纸篓“

目录

报错截图

解决方法

知识科普


报错截图

解决方法

  1. 打开系统设置->安全性与隐私->选择任何来源
  1. 如果打开没有看到"任何来源",如果不开启"任何来源"的选项,会直接影响到无法运行的第三方应用。开启"任何来源"的方法如下:

打开终端

bash 复制代码
sudo spctl  --master-disable

然后回车,继续输入密码,然后回车。再重新打开,系统设置->安全性与隐私->选择任何来源

  1. 打开终端输入
bash 复制代码
sudo xattr -r -d com.apple.quarantine
  1. 将应用程序中的APP图标拖入终端
bash 复制代码
sudo xattr -r -d com.apple.quarantine /Applications/******.app
  1. 回车输入密码即可

重新打开即可

知识科普

MacOS支持使用类似 Linux 的 API 从文件或目录中列出、 获取、设置、和删除扩展属性。在命令行中,这些能力通过xattr实用程序公开。xattr usage使用如下:

bash 复制代码
xattr --help
usage: xattr [-l] [-r] [-s] [-v] [-x] file [file ...]
       xattr -p [-l] [-r] [-s] [-v] [-x] attr_name file [file ...]
       xattr -w [-r] [-s] [-x] attr_name attr_value file [file ...]
       xattr -d [-r] [-s] attr_name file [file ...]
       xattr -c [-r] [-s] file [file ...]

The first form lists the names of all xattrs on the given file(s).
The second form (-p) prints the value of the xattr attr_name.
The third form (-w) sets the value of the xattr attr_name to the string attr_value.
The fourth form (-d) deletes the xattr attr_name.
The fifth form (-c) deletes (clears) all xattrs.

options:
  -h: print this help
  -l: print long format (attr_name: attr_value and hex output has offsets and
      ascii representation)
  -r: act recursively.  # 递归地行动
  -s: act on the symbolic link itself rather than what the link points to
  -v: also print filename (automatic with -r and with multiple files)
  -x: attr_value is represented as a hex string for input and output
相关推荐
风哥2号1 分钟前
数据库教程FGMT04‑生产环境Linux+Oracle19c RAC集群安装配置与项目实战
linux·数据库
qetfw9 分钟前
Debian Postfix + Dovecot 基础配置:DNS、Maildir、IMAP 与邮件队列验证
linux·服务器·网络·debian
weixin_4462608510 分钟前
PromptMatic:通过多阶段提示优化提升大模型的指令遵循能力
运维·服务器
pt104310 分钟前
从恐惧到自动化的百年突围
运维·自动化
HackTwoHub11 分钟前
AI自动化信息收集赋能渗透测试!集成多款主流扫描工具,多维智能评分,精准锁定高危资产
运维·人工智能·安全·web安全·网络安全·自动化·系统安全
j7~13 分钟前
【Linux】三十五.网络基础(三)《从零实现一个C++ HTTP服务器:完整项目实战》----万字详解
运维·网络协议·http·网络层·服务层·协议层·http的实现
吴声子夜歌14 分钟前
Shell脚本——数组
linux·运维·shell
Web极客码22 分钟前
GPT-6 Astra 上手体验:如何让编码代理真正提速
服务器·gpt·ai·大模型·astra
yuewell_ai27 分钟前
具身机器人一多服务器就崩-告别轮询上事件驱动
运维·服务器·机器人
whysoft37 分钟前
创意新用法-把老磁带转录成mp3-第2部分
linux·计算机外设