博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
“App can’t be opened because it is from an unidentified developer” 的解决之道?
阅读量:2063 次
发布时间:2019-04-29

本文共 1365 字,大约阅读时间需要 4 分钟。

解决方案

关于 com.apple.quarantine

com.apple.quarantine—Tagging files downloaded from the Internet as possibly untrustworthy, storing the application used to download them, among other things.

当打开没有签名的 Mac 应用时,可能会报 “App can’t be opened because it is from an unidentified developer” 的错误。这种安全机制叫做 GateKeeper。

删除这个属性,就可以去除app 的隔离性,实现打开软件。

$ xattr -d  com.apple.quarantine targetapp

 

xattr 命令简介

xattr – display and manipulate extended attributes

xattr 命令用于展示和修改扩展属性;

个人认为 xattr 可以看做是 extend 和 attributes 的缩写。

 

什么是扩展属性?

扩展属性是与文件一起存储的任意元数据,但与文件系统属性(如修改时间或文件大小)是分开的。

元数据通常是以null结尾的UTF-8字符串,但也可以是任意二进制数据。

有哪些扩展属性,都代表什么意思?

常见用法

$ xattr -h

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 ...]  # 删除所有属性
 
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

原文链接:https://blog.csdn.net/lovechris00/article/details/113060237

 

你可能感兴趣的文章
嵌入式 知识积累(五)之硬件工程师具备基本技能
查看>>
中小型园区网络的设计与实现 (一)
查看>>
别人的难题,就是你的价值。
查看>>
中小型园区网络的设计与实现 (二)
查看>>
中小型园区网络的设计与实现 (三)
查看>>
VLAN与子网划分区别
查看>>
Cisco Packet Tracer教程
查看>>
01. 开篇:组建小型局域网
查看>>
02. 交换机的基本配置和管理
查看>>
03. 交换机的Telnet远程登陆配置
查看>>
04. 交换机的端口聚合配置
查看>>
05. 交换机划分Vlan配置
查看>>
06. 三层交换机实现VLAN间路由
查看>>
07. 快速生成树协议
查看>>
08. 路由器的基本配置和Talent配置
查看>>
09. 路由器单臂路由配置
查看>>
10. 路由器静态路由配置
查看>>
路由器动态ip获取不到的处理办法
查看>>
微信小程序-调用-腾讯视频-解决方案
查看>>
giuhub搭建及常用操作
查看>>