npm离线安装包
先在联网机器安装node
设置好缓存目录
设置国内镜像npm config set registry https://registry.npmmirror.com
命令npm config set cache "C:\Users\ch\.npm"
直接下载好项目
设置https替换ssh
git config --global url."https://github.com/".insteadOf git@github.com:
git config --global url."https://".insteadOf ssh://
git config --global url."https://".insteadOf git://
命令npm install -g openclaw@latest --prefer-offline
openclaw的安装条件,前提
- 必须安装的依赖
OpenClaw 是 Node.js-based 的 CLI 工具,因此需要:
Node.js ≥ 22.12.0
下载地址:nodejs.org
勾选 “Add to PATH”。
VS Build Tool(必须)
解决 node-gyp / llama.cpp 编译失败的核心:
必须安装 Microsoft Visual Studio Build Tools + Desktop C++ workload。
下载:
https://visualstudio.microsoft.com/visual-cpp-build-tools/
安装时勾选:
Desktop development with C++
Windows SDK(默认)
本文来自博客园,作者:竹石2020,转载请注明原文链接:https://www.cnblogs.com/ch2020/p/19656969
浙公网安备 33010602011771号