解决方案 | mac安装Navicat,显示已损坏无法打开的


在mac上安装非app sotre上的应用时,大概率会见到过以下的提示框




sudo xattr -d /Applications/

注意:/Applications/ 换成你的App路径(推荐直接将.app文件拖入终端中自动生成路径,以防空格等转义字符手动复制或输入出现错误)




The xattr command can be used to display, modify or remove the extended attributes of one or more files, including directories and symbolic links. Extended attributes are arbitrary metadata stored with a file, but separate from the filesystem attributes (such as modification time or file size). The metadata is often a null-terminated UTF-8 string, but can also be arbitrary binary data.

One or more files may be specified on the command line. For the first two forms of the command, when there are more than one file, the file name is displayed along with the actual results. When only one file is specified, the display of the file name is usually suppressed (unless the -v option described below, is also specified).

In the first form of the command (without any other mode option specified), the names of all extended attributes are listed. Attribute names can also be displayed using ``ls -l@''.

In the second form, using the -p option (``print''), the value associated with the given attribute name is displayed. Attribute values are usually displayed as strings. However, if nils are detected in the data, the value is displayed in a hexadecimal representation.

The third form, with the -w option (``write''), causes the given attribute name to be assigned the given value.

The fourth form, with the -d option (``delete''), causes the given attribute name (and associated value), to be removed.

In the fifth form, with the -c option (``clear''), causes all attributes (including their associated values), to be removed.

Finally, the last form, with either the -h or --help option, displays a short help message and exits immediately.

一句话总结一下:xattr 命令用于展示,修改或者删除扩展属性;问题又来了,拓展属性干嘛的?


Mac OS X 10.4 and later support extended attributes by making use of the HFS+ filesystem Attributes File B-tree feature which allows for named forks. Although the named forks in HFS+ support arbitrarily large amounts of data through extents, the OS support for extended attributes only supports inline attributes, limiting their size to that which can fit within a single B-tree node.[citation needed] Any regular file may have a list of extended attributes. HFS+ supports an arbitrary number of named forks, and it is unknown if macOS imposes any limit on the number of extended attributes.

Each attribute consists of a name and the associated data. The name is a null-terminated Unicode string. No namespace restrictions are present (making this an open xattr system) and the convention is to use a reverse DNS string (similar to Uniform Type Identifiers) as the attribute name.

macOS supports listing,[18] getting,[19] setting,[20] and removing[21] extended attributes from files or directories using a Linux-like API. From the command line, these abilities are exposed through the xattr utility.[22]

Since macOS 10.5, files originating from the web are marked with via extended file attributes.[23] In some older versions of macOS (such as Mac OS X 10.6), user space extended attributes were not preserved on save in common Cocoa applications (TextEdit, Preview etc.).[citation needed]

只摘录了关于mac os x的描述,完整的可以参考:维基百科-extended file attribute
1)Mac OS X 10.4和更高版本通过使用HFS +文件系统属性文件B *-树功能来支持扩展属性
4)从macOS 10.5开始,源自网络的文件通过扩展文件属性标记为




本原创文章未经允许不得转载 | 当前页面:BH4FFU » 解决方案 | mac安装Navicat,显示已损坏无法打开的

评论 8510