一、环境准备
1. 检查 npm 版本
可通过以下命令检查版本:
npm -v
2. 检查 Node.js 版本
注意:Node.js 版本需大于等于 22.00。
node -v
二、安装 OpenClaw
1. 卸载旧版(如有)
npm uninstall -g openclaw
2. 命令安装
sudo npm i -g openclaw
执行后需输入系统密码(输入时不显示字符)。
成功安装提示示例:
npm warn deprecated npmlog@6.0.2: This package is no longer supported.
npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory...
npm warn deprecated tar@6.2.1: Old versions of tar are not supported...
added 711 packages in 4m
130 packages are looking for funding
run `npm fund` for details

注意事项:可能出现的两种错误
Git 连接错误
输入
npm uninstall -g openclaw,出现fatal: unable to access 'https://github.com/whiskeysockets/libsignal-node.git/'错误。解决方案:修改 Git 下载协议为 HTTPS。














