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
相关推荐
峰顶听歌的鲸鱼5 小时前
Kubernetes介绍和部署
运维·笔记·云原生·容器·kubernetes·学习方法
物理与数学5 小时前
linux 内存分布
linux·linux内核
信创天地5 小时前
自动化运维利器赋能信创:Ansible与SaltStack在国产系统的部署与批量管理实战
运维·自动化·ansible
东城绝神6 小时前
《Linux运维总结:基于ARM64+X86_64架构使用docker-compose一键离线部署MySQL8.0.43 NDB Cluster容器版集群》
linux·运维·mysql·架构·高可用·ndb cluster
creator_Li6 小时前
即时通讯项目--(1)环境搭建
linux·运维·ubuntu
Ka1Yan6 小时前
Docker:基本概念与快速入门
运维·docker·容器
Mr'liu7 小时前
MongoDB 7.0 副本集高可用部署
linux·mongodb
文静小土豆8 小时前
Rocky Linux 二进制 安装K8S-1.35.0高可用集群
linux·运维·kubernetes
小技工丨8 小时前
华为TaiShan 200 2280 ARM服务器虚拟化部署完整指南
运维·服务器·arm开发
暮云星影8 小时前
二、linux系统 应用开发:整体Pipeline流程
linux·arm开发