diff --git a/website/tutorial.html b/website/tutorial.html index 0b7c297..4190069 100644 --- a/website/tutorial.html +++ b/website/tutorial.html @@ -477,6 +477,7 @@ npm config get registry

第三步:安装 OpenClaw

+

方式 A:npm 安装(通用)

# 全局安装
 npm install -g openclaw@latest
 
@@ -486,6 +487,35 @@ npm install -g openclaw@latest --registry=https://registry.npmmirror.com
 # 验证
 openclaw --version
+

方式 B:pnpm 安装(更快)

+
# 如果没有 pnpm,先安装
+npm install -g pnpm
+
+# 用 pnpm 安装 OpenClaw
+pnpm add -g openclaw@latest
+pnpm approve-builds -g
+openclaw onboard --install-daemon
+ +

方式 C:从源码构建(开发者)

+
git clone https://github.com/openclaw/openclaw.git
+cd openclaw && pnpm install && pnpm ui:build && pnpm build
+pnpm link --global
+openclaw --version
+ +

常见安装问题

+ +
sharp 构建失败?添加环境变量跳过本地编译: +
SHARP_IGNORE_GLOBAL_LIBVIPS=1 npm install -g openclaw@latest
+
+ +
找不到 openclaw 命令?PATH 未包含全局 bin 目录: +
# 添加到 ~/.zshrc 或 ~/.bashrc
+export PATH="$(npm prefix -g)/bin:$PATH"
+source ~/.zshrc
+
+ +
Windows 用户建议:推荐使用 WSL2(Windows Subsystem for Linux)安装,兼容性最好。原生 Windows 可能遇到路径和权限问题。
+

第四步:启动配置向导

# 推荐:启动向导 + 安装后台服务
@@ -522,6 +552,20 @@ openclaw dashboard       # 打开网页控制台
推荐:国内用户先选 DeepSeek,注册即送免费额度,API 直连无需翻墙。
+

新手首次配置推荐

+

如果你是第一次配置 AI 模型,以下模型配置最简单,适合入门:

+ + + + + + + + +
模型配置难度说明
Kimi (月之暗面)⭐ 最简单注册即用,向导直接选择
智谱 GLM⭐ 简单免费额度,配置直观
通义千问 Qwen⭐ 简单阿里云生态,免费额度大
DeepSeek⭐⭐ 简单需填 Custom Provider + Base URL
腾讯混元⭐⭐ 中等腾讯云生态
+ +
注意:不建议新手使用淘宝等渠道购买的第三方 API Key。这类 Key 来源不明,调试困难,容易出问题。请直接到各模型官网注册获取。
+

DeepSeek 配置 国内首选

@@ -757,6 +801,7 @@ openclaw gateway restart +

微信机器人 社区插件

@@ -909,6 +954,26 @@ netstat -ano | findstr ":18789" # 杀死进程后重启 openclaw gateway restart +

sharp 构建失败

+
# 跳过 sharp 本地编译
+SHARP_IGNORE_GLOBAL_LIBVIPS=1 npm install -g openclaw@latest
+

sharp 是图片处理库,某些系统缺少编译工具会报错。上面的环境变量可跳过本地编译。

+ +

找不到 openclaw 命令(PATH 问题)

+
# 查看全局 bin 目录
+npm prefix -g
+
+# 添加到 PATH(写入 ~/.zshrc 或 ~/.bashrc)
+export PATH="$(npm prefix -g)/bin:$PATH"
+source ~/.zshrc
+ +

Windows:原生 vs WSL2

+

原生 Windows 安装可能遇到路径、权限、编译工具问题。推荐使用 WSL2

+
# 安装 WSL2(管理员 PowerShell)
+wsl --install
+
+# 然后在 WSL2 Ubuntu 中按 Mac/Linux 步骤安装
+

完全重置

# 重置所有配置
 openclaw reset --scope full
@@ -1001,6 +1066,7 @@ docker compose up -d
教程hello-clawDatawhale 体系化入门教程 openclaw-docs276 篇源码级深度文档 awesome-openclaw-skills社区精选技能合集 + 社区教程官方安装手册(中文)OpenClaw 官方中文安装文档,含 pnpm、源码构建等 工具NapCatQQQQ 机器人框架(备选) openclaw-wechat微信接入插件