Skip to content

Commit

Permalink
Merge pull request #23 from maiqingqiang/add-faq
Browse files Browse the repository at this point in the history
📝 docs(README.md): Add FAQ section for resolving "file is damaged" is…
  • Loading branch information
johnmai-dev authored Nov 3, 2024
2 parents 29ae928 + 0cc109d commit 6d56f3b
Show file tree
Hide file tree
Showing 2 changed files with 110 additions and 1 deletion.
50 changes: 50 additions & 0 deletions README-zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,56 @@

![iShot_2024-08-31_23.55.39.png](images/iShot_2024-08-31_23.55.39.png)

## FAQ

### 1. 在 macOS 安装后,打开时显示“文件损坏”或没有响应

由于 ChatMLX 未经过签名,因此被 macOS 安全检查阻止。

如果在安装后遇到“文件损坏”的错误,请按照以下步骤操作:

```bash
xattr -cr /Applications/ChatMLX.app
```

之后,您应该能够正常打 ChatMLX。

如果出现以下信息:

```sh
option -r not recognized

usage: xattr [-slz] file [file ...]
xattr -p [-slz] attr_name file [file ...]
xattr -w [-sz] attr_name attr_value file [file ...]
xattr -d [-s] attr_name file [file ...]
xattr -c [-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 attr_value.
The fourth form (-d) deletes the xattr attr_name.
The fifth form (-c) deletes (clears) all xattrs.

options:
-h: print this help
-s: act on symbolic links themselves rather than their targets
-l: print long format (attr_name: attr_value)
-z: compress or decompress (if compressed) attribute value in zip format
```

那就执行下面这个命令:

```bash
xattr -c /Applications/ChatMLX.app/*
```

如果以上命令仍然无效,可以尝试以下命令:

```bash
sudo xattr -d com.apple.quarantine /Applications/ChatMLX.app/
```

## Star 历史 🌟

[![星标历史图表](https://api.star-history.com/svg?repos=maiqingqiang/ChatMLX&type=Date)](https://star-history.com/#maiqingqiang/ChatMLX&Date)
Expand Down
61 changes: 60 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ English | [简体中文](./README-zh_CN.md)
<img src="ChatMLX/Assets.xcassets/AppIcon.appiconset/1024.png" alt="Logo" width="80" height="80">
</a>

<h3 align="center">ChatMLX</h3>
<h3 align="center">ChatMLX</h3>

<p align="center">
ChatMLX is a modern, open-source, high-performance chat application for MacOS based on large language models, based on the powerful performance of <a href="https://github.com/ml-explore/mlx-swift">MLX</a> and Apple silicon. It supports multiple models, providing users with a rich variety of conversation options. It runs LLM locally to ensure user privacy and security.
Expand Down Expand Up @@ -45,19 +45,78 @@ https://github.com/user-attachments/assets/75984252-058f-4782-ad5d-33b3ce772639

![iShot_2024-08-31_23.55.39.png](images/iShot_2024-08-31_23.55.39.png)

## FAQ

### 1. After installing on macOS, it shows "The file is damaged" or there’s no response when opening it.

ChatMLX is not signed, which causes macOS security checks to block it.

If you encounter the "The file is damaged" error after installation, follow these steps:

```bash
xattr -cr /Applications/ChatMLX.app
```

You should then be able to open it normally.

If you see this message:

```sh
option -r not recognized

usage: xattr [-slz] file [file ...]
xattr -p [-slz] attr_name file [file ...]
xattr -w [-sz] attr_name attr_value file [file ...]
xattr -d [-s] attr_name file [file ...]
xattr -c [-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 attr_value.
The fourth form (-d) deletes the xattr attr_name.
The fifth form (-c) deletes (clears) all xattrs.

options:
-h: print this help
-s: act on symbolic links themselves rather than their targets
-l: print long format (attr_name: attr_value)
-z: compress or decompress (if compressed) attribute value in zip format
```

Execute this command instead:

```bash
xattr -c /Applications/ChatMLX.app/*
```

If that doesn’t work, try running this command:

```bash
sudo xattr -d com.apple.quarantine /Applications/ChatMLX.app/
```

## Star History 🌟

[![Star History Chart](https://api.star-history.com/svg?repos=maiqingqiang/ChatMLX&type=Date)](https://star-history.com/#maiqingqiang/ChatMLX&Date)

[contributors-shield]: https://img.shields.io/github/contributors/maiqingqiang/ChatMLX.svg?style=for-the-badge

[contributors-url]: https://github.com/maiqingqiang/ChatMLX/graphs/contributors

[forks-shield]: https://img.shields.io/github/forks/maiqingqiang/ChatMLX.svg?style=for-the-badge

[forks-url]: https://github.com/maiqingqiang/ChatMLX/network/members

[stars-shield]: https://img.shields.io/github/stars/maiqingqiang/ChatMLX.svg?style=for-the-badge

[stars-url]: https://github.com/maiqingqiang/ChatMLX/stargazers

[issues-shield]: https://img.shields.io/github/issues/maiqingqiang/ChatMLX.svg?style=for-the-badge

[issues-url]: https://github.com/maiqingqiang/ChatMLX/issues

[license-shield]: https://img.shields.io/github/license/maiqingqiang/ChatMLX.svg?style=for-the-badge

[license-url]: https://github.com/maiqingqiang/ChatMLX/blob/main/LICENSE

<p align="right">(<a href="#readme-top">back to top</a>)</p>

0 comments on commit 6d56f3b

Please sign in to comment.