如何在MacBook上安装部署原生openclaw

一、macbook环境准备

  mac终端支持git,curl命令

二、安装openclaw

安装openclaw需要安装Node.js(版本>=22),推荐使用nvm Node.js 24

1. 下载安装nvm

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh |bash

curl -o- https://hub.fastgit.xyz/nvm-sh/nvm/v0.40.3/install.sh | bash

如果以上两个镜像源都连不上,使用国内的镜像源

使用国内的镜像源:

git clone https://gitee.com/mirrors/nvm.git ~/.nvm && cd ~/.nvm && git checkout v0.40.3

跳过“2.执行nvm.sh”执行下面的环境变量

export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ]&nbs