Debian安装openclaw
4. 安装 Node.js 22 LTS(满足 Agent Reach 和 OpenClaw 要求)# 应输出:https://registry.npmmirror.com。node --version# 应显示 v22.x.x。npm --version# 应显示版本号。# 3. 安装 n 版本管理工具(现在会很快)# 1. 安装 nvm(使用国内镜像加速)# 4. 安装 Node.js 22。
1 安装npm
# 清理旧文件
rm -rf ~/.nvm
git clone https://gitee.com/mirrors/nvm.git ~/.nvm && cd ~/.nvm && git checkout v0.39.7
# 配置环境变量
echo 'export NVM_DIR="$HOME/.nvm"' >> ~/.bashrc
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> ~/.bashrc
echo '[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"' >> ~/.bashrc
# 立即生效
source ~/.bashrc
# 国内源安装 Node.js
export NVM_NODEJS_ORG_MIRROR=https://npmmirror.com/mirrors/node/
nvm install 22
nvm use 22
nvm alias default 22
# 验证
node -v
npm -v
-----------------------
或 # 1. 安装 nvm(使用国内镜像加速)
sudo apt update
sudo apt install --reinstall ca-certificates git
export NVM_NODEJS_ORG_MIRROR=https://npmmirror.com/mirrors/node/
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
# 2. 加载 nvm
source ~/.bashrc
# 或source ~/.zshrc
# 3. 验证 nvm 安装
nvm --version
# 4. 安装 Node.js 22 LTS(满足 Agent Reach 和 OpenClaw 要求)
nvm install 22
nvm use 22
nvm alias default 22
# 5. 验证安装
node --version # 应显示 v22.x.x
npm --version # 应显示版本号
-----------------------
或:
# 1. 设置 npm 镜像源
npm config set registry https://mirrors.cloud.tencent.com/npm/
# 2. 验证是否设置成功
npm config get registry
# 应输出:https://registry.npmmirror.com
# 3. 安装 n 版本管理工具(现在会很快)
npm install -g n
# 4. 安装 Node.js 22
n 22
# 5. 验证版本
node --version
npm --version
# 6.安装openclaw
npm i -g openclaw
openclaw onboard
————————————
或
# 1. First, clean up the broken installation
npm uninstall -g openclaw 2>/dev/null
rm -rf /root/.nvm/versions/node/v22.22.1/lib/node_modules/openclaw
# 2. Clear npm cache
npm cache clean --force
# 3. Use the official installer (recommended method)
curl -fsSL https://openclaw.ai/install.sh | bash
2 写入启动项
# 将以下行追加到 ~/.bashrc
echo 'alias agent-reach="$HOME/.agent-reach-venv/bin/agent-reach"' >> ~/.bashrc
# 使配置立即生效
source ~/.bashrc
# 验证
agent-reach --help
3 启动网关
启动网关看UI
openclaw gateway
/vol1/1000/workspace/.openclaw/workspace
18789
20000
更多推荐




所有评论(0)