mac上,『已损坏,无法打开。 您应该将它移到废纸篓』的恶心玩意怎么解决 ...

打印 上一主题 下一主题

主题 1832|帖子 1832|积分 5496

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?立即注册

x
一、答应“任何来源”开启
M1 mac打开【体系偏好设置】,选择【安全性与隐私】可以看到【任何来源】已经选定。

接着打开文件举行安装。
假如没有看到“任何来源”的选项,假如不开启“任何来源”的选项,会直接影响到无法运行的第三方应用。开启“任何来源”的方法如下:
【启动台】,选择【终端】,如下图所示:
  1. sudo spctl  --master-disable
复制代码
然后回车,继续输入密码,然后回车。再重新打开【体系偏好设置】,选择【安全性与隐私】。
二、假如显示为『任何来源』但照旧显示“已损坏,无法打开。 您应该将它移到废纸篓”,要用这种方法:
打开 “访达”(Finder)进入 “应用程序” 目次,找到该软件图标,将图标拖到刚才的终端窗口里面,会得到如下组合(如图所示):
  1. sudo xattr -r -d com.apple.quarantine /Applications/WebStrom.app
复制代码

回到终端窗口按回车,输入体系密码回车即可。
接着重新打开安装软件,就可以正常安装了。
附:
macOS 支持使用雷同 Linux 的 API 从文件或目次中列出、 获取、设置、和删除扩展属性。在下令行中,这些能力通过xattr实用程序公开。xattr  usage使用如下:
  1. usage: xattr [-l] [-r] [-s] [-v] [-x] file [file ...]
  2.        xattr -p [-l] [-r] [-s] [-v] [-x] attr_name file [file ...]
  3.        xattr -w [-r] [-s] [-x] attr_name attr_value file [file ...]
  4.        xattr -d [-r] [-s] attr_name file [file ...]
  5.        xattr -c [-r] [-s] file [file ...]
  6. The first form lists the names of all xattrs on the given file(s).
  7. The second form (-p) prints the value of the xattr attr_name.
  8. The third form (-w) sets the value of the xattr attr_name to the string attr_value.
  9. The fourth form (-d) deletes the xattr attr_name.
  10. The fifth form (-c) deletes (clears) all xattrs.
  11. options:
  12.   -h: print this help
  13.   -l: print long format (attr_name: attr_value and hex output has offsets and
  14.       ascii representation)
  15.   -r: act recursively
  16.   -s: act on the symbolic link itself rather than what the link points to
  17.   -v: also print filename (automatic with -r and with multiple files)
  18.   -x: attr_value is represented as a hex string for input and output
复制代码
man xattr下令,剖析如下:
  1. man xattr
复制代码
  1. NAME
  2.      xattr – display and manipulate extended attributes
  3. SYNOPSIS
  4.      xattr [-lrsvx] file ...
  5.      xattr -p [-lrsvx] attr_name file ...
  6.      xattr -w [-rsx] attr_name attr_value file ...
  7.      xattr -d [-rsv] attr_name file ...
  8.      xattr -c [-rsv] file ...
  9.      xattr -h | --help
  10. DESCRIPTION
  11.      The xattr command can be used to display, modify or remove the extended attributes of one or more files, including
  12.      directories and symbolic links.  Extended attributes are arbitrary metadata stored with a file, but separate from the
  13.      filesystem attributes (such as modification time or file size).  The metadata is often a null-terminated UTF-8 string,
  14.      but can also be arbitrary binary data.
  15.      One or more files may be specified on the command line.  For the first two forms of the command, when there are more
  16.      than one file, the file name is displayed along with the actual results.  When only one file is specified, the display
  17.      of the file name is usually suppressed (unless the -v option described below, is also specified).
  18.      In the first form of the command (without any other mode option specified), the names of all extended attributes are
  19.      listed.  Attribute names can also be displayed using “ls -l@”.
  20.      In the second form, using the -p option (“print”), the value associated with the given attribute name is displayed.
  21.      Attribute values are usually displayed as strings.  However, if nils are detected in the data, the value is displayed
  22.      in a hexadecimal representation.
  23.      The third form, with the -w option (“write”), causes the given attribute name to be assigned the given value.
  24.      The fourth form, with the -d option (“delete”), causes the given attribute name (and associated value), to be removed.
  25.      In the fifth form, with the -c option (“clear”), causes all attributes (including their associated values), to be
  26.      removed.
  27.      Finally, the last form, with either the -h or --help option, displays a short help message and exits immediately.
  28. OPTIONS
  29.      -l  By default, the first two command forms either displays just the attribute names or values, respectively.  The -l
  30.          option causes both the attribute names and corresponding values to be displayed.  For hexadecimal display of
  31.          values, the output is preceeded with the hexadecimal offset values and followed by ASCII display, enclosed by “|”.
  32.      -r  If a file argument is a directory, act as if the entire contents of the directory recursively were also specified
  33.          (so that every file in the directory tree is acted upon).
  34.      -s  If a file argument is a symbolic link, act on the symbolic link itself, rather than the file that the symbolic
  35.          link points at.
  36.      -v  Force the file name to be displayed, even for a single file.
  37.      -x  Force the attribute value to be displayed in the hexadecimal representation.
  38.          The -w option normally assumes the input attribute value is a string.  Specifying the -x option causes xattr to
  39.          expect the input in hexadecimal (whitespace is ignored).  The xxd(1) command can be used to create hexadecimal
  40.          representations from exising binary data, to pass to xattr.
  41. EXIT STATUS
  42.      The xattr command exits with zero status on success.  On error, non-zero is returned, and an error message is printed
  43.      to the standard error.  For system call errors, both the error code and error string are printed (see getxattr(2),
  44.      listxattr(2), removexattr(2) and setxattr(2) for a complete list of possible error codes).
  45.      Some attribute data may have a fixed length that is enforced by the system.  For example,
  46.            % xattr -w com.apple.FinderInfo 0 foo
  47.            xattr: [Errno 34] Result too large: 'foo'
  48.      The com.apple.FinderInfo attribute must be 32 bytes in length.
  49. EXAMPLES
  50.      This example copies the com.apple.FinderInfo attribute from the /usr directory to the MyDir directory:
  51.            % xattr -px com.apple.FinderInfo /usr
  52.            00 00 00 00 00 00 00 00 40 00 00 00 00 00 00 00
  53.            00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  54.            % xattr -l MyDir
  55. % xattr -wx com.apple.FinderInfo \
  56.              "`xattr -px com.apple.FinderInfo /usr`" MyDir
  57.            % xattr -l MyDir
  58.            com.apple.FinderInfo:
  59.            00000000  00 00 00 00 00 00 00 00 40 00 00 00 00 00 00 00  |........@.......|
  60.            00000010  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  |................|
  61.            00000020
  62. SEE ALSO
  63.      ls(1), xxd(1), getxattr(2), listxattr(2), removexattr(2), setxattr(2)
  64. macOS 13.5                                           November 29, 2010     
复制代码


免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!更多信息从访问主页:qidao123.com:ToB企服之家,中国第一个企服评测及商务社交产业平台。
回复

使用道具 举报

0 个回复

倒序浏览

快速回复

您需要登录后才可以回帖 登录 or 立即注册

本版积分规则

乌市泽哥

论坛元老
这个人很懒什么都没写!
快速回复 返回顶部 返回列表