35 lines
1.1 KiB
Markdown
Executable File
35 lines
1.1 KiB
Markdown
Executable File
# win11安装openclaw问题及解决
|
||
|
||
## 一键安装失败 iwr -useb <https://openclaw.ai/install.ps1> | iex
|
||
|
||
- git 缺失
|
||

|
||
**问题**:git 缺失导致一键安装失败
|
||
**解决**:安装 git
|
||
|
||
```PowerShell
|
||
winget install --id Git.Git -e --source winget
|
||
```
|
||
|
||
- 报错如下,且要求选择运行 .iso 的软件
|
||

|
||
**问题**:.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`
|
||

|
||
**问题**:实际执行的是 npm install -g openclaw,编译 C++ 推理库阶段失败
|
||
**解决**:跳过编译
|
||
|
||
```PowerShell
|
||
# 使用国内镜像
|
||
npm i -g openclaw --ignore-scripts --registry=https://registry.npmmirror.com
|
||
# 或挂梯子使用官方镜像
|
||
npm i -g openclaw --ignore-scripts
|
||
```
|