Mac如何安装openclaw

Mac如何安装openclaw如果不知道是否安装 可以用下面的命令查看自己的版本 注意 版本必须是 22 00 以上 可以检查自己的版本 输入完后 会让你输入自己的密码 密码是不显示的 直接输入然后回车即可 成功安装提示 npm warn

大家好,我是讯享网,很高兴认识大家。这里提供最前沿的Ai技术和互联网信息。



(如果不知道是否安装,可以用下面的命令查看自己的版本)

 
  

(注意:版本必须是22.00以上,可以检查自己的版本)

 
  
 
  
 
  

输入完后,会让你输入自己的密码(密码是不显示的,直接输入然后回车即可)。

成功安装提示:

npm warn deprecated npmlog@6.0.2: This package is no longer supported.

npm warn deprecated inflight@1.0.6: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.

npm warn deprecated are-we-there-yet@3.0.1: This package is no longer supported.

npm warn deprecated are-we-there-yet@2.0.0: This package is no longer supported.

npm warn deprecated gauge@3.0.2: This package is no longer supported.

npm warn deprecated gauge@4.0.4: This package is no longer supported.

npm warn deprecated tar@6.2.1: Old versions of tar are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting

npm warn deprecated tar@6.2.1: Old versions of tar are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting

npm warn deprecated node-domexception@1.0.0: Use your platform's native DOMException instead

npm warn deprecated glob@10.5.0: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting

npm warn deprecated npmlog@5.0.1: This package is no longer supported.

npm warn deprecated glob@7.2.3: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting

npm warn deprecated rimraf@3.0.2: Rimraf versions prior to v4 are no longer supported

added 711 packages in 4m

130 packages are looking for funding

  run `npm fund` for details

  

注意事项:可能出现的两种错误

1、输入:npm uninstall -g openclaw,出现如图错误:

npm error code 128

npm error An unknown git error occurred

npm error command git --no-replace-objects ls-remote ssh:///whiskeysockets/libsignal-node.git

npm error fatal: unable to access 'https://github.com/whiskeysockets/libsignal-node.git/': Failed to connect to github.com port 443 after 75023 ms: Couldn't connect to server

npm error A complete log of this run can be found in: /Users/mac/.npm/_logs/2026-02-28T05_46_11_305Z-debug-0.log

解决方案,输入修改 Git 下载协议 (强制使用 HTTPS),复制下方代码到终端,回车执行即可解决;

 
   

再输入

 
   

2、输入:npm install -g openclaw-cn@latest,出现如图错误,因为没有权限,需要用sudo

npm error code EACCES

npm error syscall mkdir

npm error path /usr/local/lib/node_modules/openclaw-cn

npm error errno -13

npm error Error: EACCES: permission denied, mkdir '/usr/local/lib/node_modules/openclaw-cn'

npm error     at async mkdir (node:internal/fs/promises:856:10)

npm error     at async /usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:576:20

npm error     at async Promise.allSettled (index 0)

npm error     at async [reifyPackages] (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:313:11)

npm error     at async Arborist.reify (/usr/local/lib/node_modules/npm/node_modules/@npmcli/arborist/lib/arborist/reify.js:125:5)

npm error     at async Install.exec (/usr/local/lib/node_modules/npm/lib/commands/install.js:150:5)

npm error     at async Npm.exec (/usr/local/lib/node_modules/npm/lib/npm.js:208:9)

npm error     at async module.exports (/usr/local/lib/node_modules/npm/lib/cli/entry.js:67:5) {

npm error   errno: -13,

npm error   code: 'EACCES',

npm error   syscall: 'mkdir',

npm error   path: '/usr/local/lib/node_modules/openclaw-cn'

npm error }

npm error

npm error The operation was rejected by your operating system.

npm error It is likely you do not have the permissions to access this file as the current user

npm error

npm error If you believe this might be a permissions issue, please double-check the

npm error permissions of the file and its containing directories, or try running

npm error the command again as root/Administrator.

npm error A complete log of this run can be found in: /Users/mac/.npm/_logs/2026-02-28T05_25_31_926Z-debug-0.log

解决方案,没有权限,npm前面加上sudo

 
  
 
  

可以查看到版本号,即安装成功。

 
  

这一步主要是提醒你,使用 OpenClaw 可能会有一些风险。请问你是否继续?按向左方向键 ←,选择 ,按  回车确认

选择选择 QiuickStart(快速开始模式),回车

这里是配置 AI 模型 API Key,OpenClaw 需要连接到大语言模型才能工作。Openclaw 比较费 token,国外模型成本较高,我选的千问;

可以「暂时跳过」,选择到最后skip for now,先在终端(Terminal)里把 OpenClaw 跑起来,确认它的 AI 大脑、文件读写权限都正常工作,后面再单独部署;

这里选择「Yes」,也可以暂不配置选择「No」,后面通过UI界面再进行配置;

点击空格,选择技能后回车。关于技能,你可以先跳过选择此步骤,或者使用空格键您需要的技能,可多选;

注意事项:出现please select at least one option

解决方案:点击空格,选择技能后回车。

这里可以配置备用 API,如果不想配置就都选「No」即可;

正在完成最后的启动服务配置,大约30秒左右;

我这个是页面启动失败,可以在浏览器输入:http://127.0.0.1:18789 http://127.0.0.1:18789 http://127.0.0.1:18789 

注意事项:

打开http://127.0.0.1:18789 链接出现  unauthorized: gateway token mismatch (open the dashboard URL and paste the token in Control UI settings)错误;

解决办法:

1、先找到openclaw.json文件;

2、找到gateway>auth>token,复制token值;

3、在概览的“网关令牌”添加令牌值,即上面复制的值;

4、重启网关;

 
   

5、打开: 即可,比如令牌是abc123,那打开链接就是http://127.0.0.1:18789/?token=abc123

小讯
上一篇 2026-03-30 12:03
下一篇 2026-03-30 12:01

相关推荐

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容,请联系我们,一经查实,本站将立刻删除。
如需转载请保留出处:https://51itzy.com/kjqy/230620.html