0


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

报错截图

解决方法

  1. 打开系统设置->安全性与隐私->选择任何来源

  1. 如果打开没有看到"任何来源",如果不开启“任何来源”的选项,会直接影响到无法运行的第三方应用。开启“任何来源”的方法如下:

打开终端

  1. sudo spctl --master-disable

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

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

重新打开即可

知识科普

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

  1. xattr --help
  2. usage: xattr [-l] [-r] [-s] [-v] [-x] file [file ...]
  3. xattr -p [-l] [-r] [-s] [-v] [-x] attr_name file [file ...]
  4. xattr -w [-r] [-s] [-x] attr_name attr_value file [file ...]
  5. xattr -d [-r] [-s] attr_name file [file ...]
  6. xattr -c [-r] [-s] file [file ...]
  7. The first form lists the names of all xattrs on the given file(s).
  8. The second form (-p) prints the value of the xattr attr_name.
  9. The third form (-w) sets the value of the xattr attr_name to the string attr_value.
  10. The fourth form (-d) deletes the xattr attr_name.
  11. The fifth form (-c) deletes (clears) all xattrs.
  12. options:
  13. -h: print this help
  14. -l: print long format (attr_name: attr_value and hex output has offsets and
  15. ascii representation)
  16. -r: act recursively. # 递归地行动
  17. -s: act on the symbolic link itself rather than what the link points to
  18. -v: also print filename (automatic with -r and with multiple files)
  19. -x: attr_value is represented as a hex string for input and output
标签: 服务器 linux 运维

本文转载自: https://blog.csdn.net/u012206617/article/details/144194650
版权归原作者 墨痕诉清风 所有, 如有侵权,请联系我们删除。

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

还没有评论