ai-courseware/openClaw/win11安装openclaw问题及解决.md

35 lines
1.1 KiB
Markdown
Executable File
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# win11安装openclaw问题及解决
## 一键安装失败 iwr -useb <https://openclaw.ai/install.ps1> | iex
- git 缺失
![error_git](./src/error_git.png)
**问题**git 缺失导致一键安装失败
**解决**:安装 git
```PowerShell
winget install --id Git.Git -e --source winget
```
- 报错如下,且要求选择运行 .iso 的软件
![error_iso](./src/error_iso.png)
**问题**.msi 文件没有正确关联到 Windows Installer 导致nodejs 安装失败
**解决** 当前窗口执行:
```PowerShell
cmd /c assoc .msi=Msi.Package
cmd /c ftype Msi.Package="%SystemRoot%\System32\msiexec.exe" /i "%1" %* Msi.Package=C:\WINDOWS\System32\msiexec.exe /i %1 %*
```
- 安装 openClaw 报错,`npm error code 1`
![error_npm](./src/error_npm.png)
**问题**:实际执行的是 npm install -g openclaw编译 C++ 推理库阶段失败
**解决**:跳过编译
```PowerShell
# 使用国内镜像
npm i -g openclaw --ignore-scripts --registry=https://registry.npmmirror.com
# 或挂梯子使用官方镜像
npm i -g openclaw --ignore-scripts
```