1. 背景
目标是在 Jetson 上运行 OpenClaw,接入模型 API,并通过飞书群聊或私聊直接调用本地 Agent。 工作流:Feishu Group -> Feishu Bot -> OpenClaw Gateway (Jetson) -> Agent -> LLM API -> 返回飞书消息。
2. 环境信息
Jetson 环境
uname -a # Linux agx229-desktop 5.10.216-tegra ...
lsb_release -a # Ubuntu 20.04.6 LTS
nvcc --version # CUDA 11.4
当前平台为 Jetson ARM64、Ubuntu 20.04、CUDA 11.4。需注意 ARM64 + Ubuntu 20.04 上的依赖兼容性问题。
3. 安装 Node.js 与 pnpm
OpenClaw 是 Node.js 项目,建议使用 Node 20。
# 安装 nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bash
source ~/.bashrc
# 配置镜像加速(可选)
nvm node_mirror https://npmmirror.com/mirrors/node/
nvm npm_mirror https://npmmirror.com/mirrors/npm/
# 安装并使用 Node.js 20
nvm install 20
nvm use 20
nvm alias default 20
# 配置 npm 镜像加速
npm config set registry https://registry.npmmirror.com
# 验证安装
node --version
npm --version
还需要安装 pnpm:
npm install -g pnpm
pnpm -v
4. 配置 pnpm 环境变量
将以下内容加入 ~/.bashrc:
export PNPM_HOME="/home/agx229/.local/share/pnpm"
case ":$PATH:" in
*":$PNPM_HOME:"*) ;;
*) export PATH="$PNPM_HOME:$PATH" ;;
esac
保存后执行 source ~/.bashrc 并验证 echo $PNPM_HOME 和 which pnpm。


