这一页按报错原文查。和"装完不生效"不同,这里讨论的是安装命令本身失败。
1. No such file or directory
cp: cannot stat 'skill-name/SKILL.md': No such file or directory
原因:路径写错,或压缩包解开后多了一层目录。
处理:
unzip -l skill.zip | head
看清楚包内结构再决定 -d 目标。
2. Permission denied
mkdir: cannot create directory '/root/.claude/skills': Permission denied
原因:用了 sudo 或目标目录属于别的用户。
处理:装到用户目录,不要 sudo;已经用 sudo 建的目录改回属主。
3. npx: command not found
npx: command not found
原因:没装 Node.js,或 PATH 里没有。
处理:装 Node 18+,node -v && npx -v 确认。
4. File exists
cp: overwrite '.../SKILL.md'?
原因:同名目录已存在(通常是旧版本)。
处理:先备份旧目录再覆盖,不要直接删。
5. 网络超时
fatal: unable to access 'https://github.com/...': Operation timed out
原因:GitHub 不可达,或代理配置失效。
处理:检查代理,或用镜像下载 zip。
6. marketplace 里找不到
/plugin install: plugin not found
原因:仓库没有 marketplace.json,或名字写错。
处理:换成 git clone + 手动拷贝。
对照表
| 报错 | 一句话处理 |
|---|---|
| No such file | 看包内结构 |
| Permission denied | 别用 sudo |
| npx not found | 装 Node |
| File exists | 先备份 |
| 网络超时 | 换代理/镜像 |
| plugin not found | 手动安装 |
安装前检查
node -v # ≥18
echo $HOME # 确认用户目录
ls ~/.claude # 确认目录存在