OpenClaw一键安装 for win10

2026-05-06阅读 0热度 0
OpenClaw

一键安装

一开始,我们尝试使用官方提供的一键安装命令。打开 PowerShell,切换到目标目录,然后执行那条看起来非常方便的安装脚本。

PS C:\Users\Administrator> d: PS D:\> cd .\openclaw\ PS D:\openclaw> powershell -ExecutionPolicy Bypass -Command "iwr -useb https://openclaw.ai/install.ps1 | iex" OpenClaw Installer [OK] Windows detected [!] Node.js not found [*] Installing Node.js... Error: Could not find a package manager (winget, choco, or scoop) Please install Node.js 22+ manually: https://nodejs.org/en/download/ Or install winget (App Installer) from the Microsoft Store.

问题立刻就出现了:安装器检测到系统缺少 Node.js,并且试图自动安装时失败了,原因是找不到可用的包管理器(如 winget、choco 或 scoop)。这意味着,要想继续,我们必须先手动安装 Node.js 22 或更高版本。

安装node

既然需要 Node.js,那就先来搞定它。一个高效的方法是使用 Node Version Manager(nvm)来管理多版本。首先检查一下当前环境。

PS C:\Users\Administrator> nvm list No installations recognized. PS C:\Users\Administrator> nvm -v 1.2.2 PS C:\Users\Administrator> nvm list available | CURRENT | LTS | OLD STABLE | OLD UNSTABLE | |------------|----------|------------|--------------| | 25.8.0 | 24.14.0 | 0.12.18 | 0.11.16 | | 25.7.0 | 24.13.1 | 0.12.17 | 0.11.15 | | 25.6.1 | 24.13.0 | 0.12.16 | 0.11.14 | ...(部分列表) This is a partial list. For a complete list, visit https://nodejs.org/en/download/releases PS C:\Users\Administrator> nvm install 24.13.0 Downloading node.js version 24.13.0 (64-bit)... Extracting node and npm... Complete Installation complete. If you want to use this version, type: nvm use 24.13.0 PS C:\Users\Administrator> nvm ls 24.13.0 PS C:\Users\Administrator> node -v node : 无法将“node”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后再试一次。 所在位置 行:1 字符: 1 + node -v + ~~~~ + CategoryInfo : ObjectNotFound: (node:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException PS C:\Users\Administrator> nvm use 24.13.0 Now using node v24.13.0 (64-bit) PS C:\Users\Administrator> node -v v24.13.0

看,流程很清晰:用 nvm 安装一个满足要求的 LTS 版本(这里选了 24.13.0)。安装完成后,虽然列表里已经有了,但直接运行 `node -v` 可能会报错,这是因为还没有激活这个版本。只需要一句 `nvm use <版本号>` 就能搞定。最后验证版本,准备工作就完成了。

继续安装

好了,Node.js 的障碍已经扫清。让我们回到最初的 OpenClaw 安装目录,再次运行那个安装脚本。

PS D:\openclaw> node -v v24.13.0 PS D:\openclaw> powershell -ExecutionPolicy Bypass -Command "iwr -useb https://openclaw.ai/install.ps1 | iex" OpenClaw Installer [OK] Windows detected [OK] Node.js v24.13.0 found Error: Git is required to install OpenClaw. Install Git for Windows: https://git-scm.com/download/win Then re-run this installer. PS D:\openclaw>

瞧,一个麻烦解决,另一个又来了。这次安装程序成功识别了 Node.js,但却提示缺少 Git。看来,这个安装脚本的依赖检查是一环扣一环的。

需要安装git

所以,下一步就很明确了:去安装 Git。对于 Windows 用户,最直接的途径就是访问 Git 的官方网站。

前往 https://git-scm.com/install/windows

在页面上找到下载地址,点击那个醒目的下载按钮,获取 Git for Windows 的安装程序。把它装好,咱们就能再次挑战 OpenClaw 的安装了。

接下来的步骤,就是在安装完 Git 之后,重新回到 PowerShell,第三次执行那个安装命令。俗话说事不过三,这次总该顺利了吧?

免责声明

本网站新闻资讯均来自公开渠道,力求准确但不保证绝对无误,内容观点仅代表作者本人,与本站无关。若涉及侵权,请联系我们处理。本站保留对声明的修改权,最终解释权归本站所有。

相关阅读

更多
欢迎回来 登录或注册后,可保存提示词和历史记录
登录后可同步收藏、历史记录和常用模板
注册即表示同意服务条款与隐私政策