---
title: "解决oh-my-zsh plugin 'zsh-autosuggestions' not found 与 plugin 'zsh-syntax-highlighting' not found问题"
url: https://blog.bktus.com/archives/9s3ea1/
author: "Saturneric"
date: 2021-05-25
language: zh-CN
categories: ["实践"]
tags: ["教程","zsh"]
translation_en: https://blog.bktus.com/en/archives/qvsol9/
---

# 解决oh-my-zsh plugin 'zsh-autosuggestions' not found 与 plugin 'zsh-syntax-highlighting' not found问题

安装 zsh 插件 zsh-autosuggestions 或者 zsh-syntax-highlighting 的时候，我们一般
会遇到 oh-my-zsh plugin 'xxx' not found 的问题。现在，我们分析并解决 oh-my-zsh
plugin 'zsh-autosuggestions' not found 与 plugin 'zsh-syntax-highlighting' not
found 问题。 问题产生的原因是，没有把插件的代码仓库克隆到本地位置上，所以你想要
的插件其实并没有被安装。 解决问题非常简单，只需要简单输入以下命令：

```
$ git clone https://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions
$ git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting
$ source ~/.zshrc
```

然后，你可以重新打开 shell，可以发现问题已解决。你也可以用该方法解决其他插件的此
类问题。
