0%

win11 + wsl openclaw 安裝

 

跟風看看 openclaw 睡個覺醒來又改名了 XDDD

中間如果有遇到以下錯誤
disconnected (1008): unauthorized: gateway token mismatch (set gateway.remote.token to match gateway

可以打開 ~/.openclaw/openclaw.json 這個檔案複製 token 然後貼上網址就正常了
http://127.0.0.1:18789/?token=xxxxxxxxxxx

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# 安裝 ubuntu-24.04
wsl --list --online
wsl --install -d Ubuntu-24.04

# 進入 ubuntu
wsl -d Ubuntu-24.04

# 安裝完 wsl 是沒有 node 的
node -v

# 更新
sudo apt update

# 安裝 node
sudo apt install nodejs npm -y

# 再看看版本
node -v

# 安裝 n 拿來更新 node
sudo npm install -g n

# 更新 node 到新版
sudo n stable

# 依然是 18.x
node -v

# 更新 hash
hash -r

# 更新 hash 即可正常 24
node -v

# 安裝龍蝦
sudo npm i -g openclaw

# 開啟龍蝦設定選擇 Antigravity
openclaw onboard

# 龍蝦 local web ui
http://127.0.0.1:18789

# 龍蝦 cli 說明
https://docs.openclaw.ai/cli

# 用 Antigravity 一定會遇到這個錯誤
# This version of Antigravity is no longer supported. Please update to receive the latest features!
# 顯示看看安裝在哪
npm config get prefix

# 切換到這個目錄
cd /usr/local/lib/node_modules/openclaw/node_modules/@mariozechner/pi-ai/dist/providers

# 開啟 vim 更新 1.11.5 改為 1.15.8
sudo vim google-gemini-cli.js

# 關閉龍蝦 gateway
openclaw gateway stop

# 看 systemd 龍蝦狀態 (詳細)
systemctl --user status openclaw-gateway

# 看 systemd 龍蝦狀態 (簡易)
systemctl --user is-active openclaw-gateway

# 重啟龍蝦
systemctl --user restart openclaw-gateway

# 停止龍蝦
systemctl --user stop openclaw-gateway

# 不想玩覺得佔空間刪除 wsl
wsl --unregister Ubuntu-24.04
關閉