windows下wsl2中Ubuntu安装openclaw

windows下wsl2中Ubuntu安装openclaw

PS C:\windows\system32> wsl -l -v
  NAME                   STATE           VERSION
* docker-desktop-data    Stopped         2
  docker-desktop         Stopped         2
  Ubuntu                 Stopped         2
PS C:\windows\system32> wsl -d Ubuntu
灾难性故障
错误代码: Wsl/Service/E_UNEXPECTED
PS C:\windows\system32> wsl --update
正在检查更新。
正在将适用于 Linux 的 Windows 子系统更新到版本: 2.7.3。
PS C:\windows\system32> wsl -d Ubuntu
Provisioning the new WSL instance Ubuntu
This might take a while...
Create a default Unix user account: root
fatal: The user `root' already exists.
Failed to create user 'root'. Please choose a different name.
Create a default Unix user account: user
New password:
Retype new password:
passwd: password updated successfully
usermod: no changes
Help improve Ubuntu!

Help us improve Ubuntu features and compatibility by sharing system reports with Canonical.
Reports are sent anonymously and do not contain any personal data.
For legal details, please visit: https://ubuntu.com/legal/systems-information-notice

We will save your answer to Windows and will only ask you once.

Would you like to opt-in to platform metrics collection (Y/n)? To see an example of the data collected, enter 'e'.
[Y/n/e]: n
Welcome to Ubuntu 26.04 LTS (GNU/Linux 6.6.114.1-microsoft-standard-WSL2 x86_64)

 * Documentation:  https://docs.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/pro

 System information as of Tue May 26 10:53:51 CST 2026

  System load:  0.03                Processes:             42
  Usage of /:   0.1% of 1006.85GB   Users logged in:       0
  Memory usage: 9%                  IPv4 address for eth0: 172.25.127.207
  Swap usage:   0%


This message is shown once a day. To disable it please create the
/home/user/.hushlogin file.
user@DESKTOP-842DJ48:/mnt/c/windows/system32$ sudo apt update && sudo apt upgrade -y
[sudo: authenticate] Password:
Get:1 http://security.ubuntu.com/ubuntu resolute-security InRelease [136 kB]
Get:2 http://archive.ubuntu.com/ubuntu resolute InRelease [136 kB]
Get:3 http://archive.ubuntu.com/ubuntu resolute-updates InRelease [136 kB]
Get:4 http://security.ubuntu.com/ubuntu resolute-security/main amd64 Packages [85.2 kB]
Get:5 http://archive.ubuntu.com/ubuntu resolute-backports InRelease [136 kB]
Get:6 http://archive.ubuntu.com/ubuntu resolute/main amd64 Packages [1480 kB]
Get:7 http://security.ubuntu.com/ubuntu resolute-security/main Translation-en [27.7 kB]
Get:8 http://security.ubuntu.com/ubuntu resolute-security/main amd64 Components [2844 B]
Get:9 http://security.ubuntu.com/ubuntu resolute-security/main amd64 c-n-f Metadata [968 B]
Get:10 http://security.ubuntu.com/ubuntu resolute-security/universe amd64 Packages [48.6 kB]
Get:11 http://archive.ubuntu.com/ubuntu resolute/main Translation-en [524 kB]
Get:12 http://security.ubuntu.com/ubuntu resolute-security/universe Translation-en [16.5 kB]
Get:13 http://security.ubuntu.com/ubuntu resolute-security/universe amd64 Components [39.8 kB]
Get:14 http://security.ubuntu.com/ubuntu resolute-security/universe amd64 c-n-f Metadata [628 B]
Get:15 http://security.ubuntu.com/ubuntu resolute-security/restricted amd64 Packages [174 kB]
Get:16 http://archive.ubuntu.com/ubuntu resolute/main amd64 Components [395 kB]
Get:17 http://archive.ubuntu.com/ubuntu resolute/main amd64 c-n-f Metadata [32.4 kB]
Get:18 http://security.ubuntu.com/ubuntu resolute-security/restricted Translation-en [29.3 kB]
Get:19 http://archive.ubuntu.com/ubuntu resolute/universe amd64 Packages [16.0 MB]
Get:20 http://security.ubuntu.com/ubuntu resolute-security/multiverse amd64 Components [212 B]
Get:21 http://security.ubuntu.com/ubuntu resolute-security/multiverse amd64 c-n-f Metadata [120 B]
Get:22 http://archive.ubuntu.com/ubuntu resolute/universe Translation-en [6329 kB]
Get:23 http://archive.ubuntu.com/ubuntu resolute/universe amd64 Components [4556 kB]
Get:24 http://archive.ubuntu.com/ubuntu resolute/universe amd64 c-n-f Metadata [313 kB]
Get:25 http://archive.ubuntu.com/ubuntu resolute/restricted amd64 Packages [152 kB]
Get:26 http://archive.ubuntu.com/ubuntu resolute/restricted Translation-en [25.8 kB]
Get:27 http://archive.ubuntu.com/ubuntu resolute/restricted amd64 Components [556 B]
Get:28 http://archive.ubuntu.com/ubuntu resolute/multiverse amd64 Packages [290 kB]
Get:29 http://archive.ubuntu.com/ubuntu resolute/multiverse Translation-en [127 kB]
Get:30 http://archive.ubuntu.com/ubuntu resolute/multiverse amd64 Components [50.0 kB]
Get:31 http://archive.ubuntu.com/ubuntu resolute/multiverse amd64 c-n-f Metadata [8276 B]
Get:32 http://archive.ubuntu.com/ubuntu resolute-updates/main amd64 Packages [90.4 kB]
Get:33 http://archive.ubuntu.com/ubuntu resolute-updates/main Translation-en [29.1 kB]
Get:34 http://archive.ubuntu.com/ubuntu resolute-updates/main amd64 Components [9956 B]
Get:35 http://archive.ubuntu.com/ubuntu resolute-updates/main amd64 c-n-f Metadata [1132 B]
Get:36 http://archive.ubuntu.com/ubuntu resolute-updates/universe amd64 Packages [51.0 kB]
Get:37 http://archive.ubuntu.com/ubuntu resolute-updates/universe Translation-en [17.2 kB]
Get:38 http://archive.ubuntu.com/ubuntu resolute-updates/universe amd64 Components [46.0 kB]
Get:39 http://archive.ubuntu.com/ubuntu resolute-updates/universe amd64 c-n-f Metadata [624 B]
Get:40 http://archive.ubuntu.com/ubuntu resolute-updates/restricted amd64 Packages [174 kB]
Get:41 http://archive.ubuntu.com/ubuntu resolute-updates/restricted Translation-en [29.3 kB]
Get:42 http://archive.ubuntu.com/ubuntu resolute-updates/multiverse amd64 Packages [3328 B]
Get:43 http://archive.ubuntu.com/ubuntu resolute-updates/multiverse Translation-en [772 B]
Get:44 http://archive.ubuntu.com/ubuntu resolute-updates/multiverse amd64 Components [216 B]
Get:45 http://archive.ubuntu.com/ubuntu resolute-updates/multiverse amd64 c-n-f Metadata [116 B]
Get:46 http://archive.ubuntu.com/ubuntu resolute-backports/main amd64 Components [212 B]
Get:47 http://archive.ubuntu.com/ubuntu resolute-backports/main amd64 c-n-f Metadata [112 B]
Get:48 http://archive.ubuntu.com/ubuntu resolute-backports/universe amd64 Components [216 B]
Get:49 http://archive.ubuntu.com/ubuntu resolute-backports/universe amd64 c-n-f Metadata [116 B]
Get:50 http://archive.ubuntu.com/ubuntu resolute-backports/restricted amd64 Components [216 B]
Get:51 http://archive.ubuntu.com/ubuntu resolute-backports/restricted amd64 c-n-f Metadata [120 B]
Get:52 http://archive.ubuntu.com/ubuntu resolute-backports/multiverse amd64 Components [216 B]
Get:53 http://archive.ubuntu.com/ubuntu resolute-backports/multiverse amd64 c-n-f Metadata [120 B]
Fetched 31.7 MB in 37s (857 kB/s)
27 packages can be upgraded. Run 'apt list --upgradable' to see them.
Upgrading:
  base-files  distro-info-data           libavahi-common-data  libcurl4t64     libnghttp2-14           openssh-client       rsync  ubuntu-release-upgrader-core  vim-runtime
  bubblewrap  gir1.2-packagekitglib-1.0  libavahi-common3      libgnutls30t64  libpackagekit-glib2-18  packagekit           sed    vim                           vim-tiny
  curl        libavahi-client3           libcurl3t64-gnutls    liblcms2-2      motd-news-config        python3-distupgrade  snapd  vim-common                    xxd

Summary:
  Upgrading: 27, Installing: 0, Removing: 0, Not Upgrading: 0
21 standard LTS security updates
  Download size: 57.7 MB
  Space needed: 647 kB / 1025 GB available

Get:1 http://archive.ubuntu.com/ubuntu resolute-updates/main amd64 motd-news-config all 14ubuntu6.1 [5632 B]
Get:2 http://archive.ubuntu.com/ubuntu resolute-updates/main amd64 base-files amd64 14ubuntu6.1 [75.0 kB]
Get:3 http://archive.ubuntu.com/ubuntu resolute-updates/main amd64 sed amd64 4.9-2ubuntu1 [195 kB]
Get:4 http://archive.ubuntu.com/ubuntu resolute-updates/main amd64 distro-info-data all 0.68ubuntu0.1 [5854 B]
Get:5 http://archive.ubuntu.com/ubuntu resolute-updates/main amd64 libgnutls30t64 amd64 3.8.12-2ubuntu1.1 [1029 kB]
Get:6 http://archive.ubuntu.com/ubuntu resolute-updates/main amd64 vim amd64 2:9.1.2141-1ubuntu4.2 [2067 kB]
Get:7 http://archive.ubuntu.com/ubuntu resolute-updates/main amd64 vim-common all 2:9.1.2141-1ubuntu4.2 [494 kB]
Get:8 http://archive.ubuntu.com/ubuntu resolute-updates/main amd64 vim-tiny amd64 2:9.1.2141-1ubuntu4.2 [867 kB]
Get:9 http://archive.ubuntu.com/ubuntu resolute-updates/main amd64 vim-runtime all 2:9.1.2141-1ubuntu4.2 [7511 kB]
Get:10 http://archive.ubuntu.com/ubuntu resolute-updates/main amd64 xxd amd64 2:9.1.2141-1ubuntu4.2 [67.9 kB]
Get:11 http://archive.ubuntu.com/ubuntu resolute-updates/main amd64 libnghttp2-14 amd64 1.68.0-2ubuntu0.1 [70.9 kB]
Get:12 http://archive.ubuntu.com/ubuntu resolute-updates/main amd64 openssh-client amd64 1:10.2p1-2ubuntu3.2 [934 kB]
Get:13 http://archive.ubuntu.com/ubuntu resolute/main amd64 ubuntu-release-upgrader-core all 1:26.04.18 [24.9 kB]
Get:14 http://archive.ubuntu.com/ubuntu resolute/main amd64 python3-distupgrade all 1:26.04.18 [101 kB]
Get:15 http://archive.ubuntu.com/ubuntu resolute-updates/main amd64 rsync amd64 3.4.1+ds1-7ubuntu0.2 [448 kB]
Get:16 http://archive.ubuntu.com/ubuntu resolute-updates/main amd64 bubblewrap amd64 0.11.1-1ubuntu0.1 [50.8 kB]
Get:17 http://archive.ubuntu.com/ubuntu resolute-updates/main amd64 curl amd64 8.18.0-1ubuntu2.1 [272 kB]
Get:18 http://archive.ubuntu.com/ubuntu resolute-updates/main amd64 libcurl4t64 amd64 8.18.0-1ubuntu2.1 [425 kB]
Get:19 http://archive.ubuntu.com/ubuntu resolute-updates/main amd64 libpackagekit-glib2-18 amd64 1.3.4-3ubuntu1 [120 kB]
Get:20 http://archive.ubuntu.com/ubuntu resolute-updates/main amd64 gir1.2-packagekitglib-1.0 amd64 1.3.4-3ubuntu1 [25.6 kB]
Get:21 http://archive.ubuntu.com/ubuntu resolute-updates/main amd64 libavahi-client3 amd64 0.8-18ubuntu1.1 [27.2 kB]
Get:22 http://archive.ubuntu.com/ubuntu resolute-updates/main amd64 libavahi-common3 amd64 0.8-18ubuntu1.1 [23.6 kB]
Get:23 http://archive.ubuntu.com/ubuntu resolute-updates/main amd64 libavahi-common-data amd64 0.8-18ubuntu1.1 [27.2 kB]
Get:24 http://archive.ubuntu.com/ubuntu resolute-updates/main amd64 libcurl3t64-gnutls amd64 8.18.0-1ubuntu2.1 [416 kB]
Get:25 http://archive.ubuntu.com/ubuntu resolute-updates/main amd64 liblcms2-2 amd64 2.17-1ubuntu0.2 [169 kB]
Get:26 http://archive.ubuntu.com/ubuntu resolute-updates/main amd64 snapd amd64 2.75.2+ubuntu26.04.2 [41.8 MB]
Get:27 http://archive.ubuntu.com/ubuntu resolute-updates/main amd64 packagekit amd64 1.3.4-3ubuntu1 [505 kB]
Fetched 57.7 MB in 1min 7s (863 kB/s)
(Reading database ... 35923 files and directories currently installed.)
Preparing to unpack .../motd-news-config_14ubuntu6.1_all.deb ...
Unpacking motd-news-config (14ubuntu6.1) over (14ubuntu6) ...
Preparing to unpack .../base-files_14ubuntu6.1_amd64.deb ...
Unpacking base-files (14ubuntu6.1) over (14ubuntu6) ...
Setting up base-files (14ubuntu6.1) ...
motd-news.service is a disabled or a static unit not running, not starting it.
(Reading database ... 35923 files and directories currently installed.)
Preparing to unpack .../sed_4.9-2ubuntu1_amd64.deb ...
Unpacking sed (4.9-2ubuntu1) over (4.9-2build3) ...
Setting up sed (4.9-2ubuntu1) ...
(Reading database ... 35923 files and directories currently installed.)
Preparing to unpack .../00-distro-info-data_0.68ubuntu0.1_all.deb ...
Unpacking distro-info-data (0.68ubuntu0.1) over (0.68build1) ...
Preparing to unpack .../01-libgnutls30t64_3.8.12-2ubuntu1.1_amd64.deb ...
Unpacking libgnutls30t64:amd64 (3.8.12-2ubuntu1.1) over (3.8.12-2ubuntu1) ...
Preparing to unpack .../02-vim_2%3a9.1.2141-1ubuntu4.2_amd64.deb ...
Unpacking vim (2:9.1.2141-1ubuntu4.2) over (2:9.1.2141-1ubuntu4) ...
Preparing to unpack .../03-vim-common_2%3a9.1.2141-1ubuntu4.2_all.deb ...
Unpacking vim-common (2:9.1.2141-1ubuntu4.2) over (2:9.1.2141-1ubuntu4) ...
Preparing to unpack .../04-vim-tiny_2%3a9.1.2141-1ubuntu4.2_amd64.deb ...
Unpacking vim-tiny (2:9.1.2141-1ubuntu4.2) over (2:9.1.2141-1ubuntu4) ...
Preparing to unpack .../05-vim-runtime_2%3a9.1.2141-1ubuntu4.2_all.deb ...
Unpacking vim-runtime (2:9.1.2141-1ubuntu4.2) over (2:9.1.2141-1ubuntu4) ...
Preparing to unpack .../06-xxd_2%3a9.1.2141-1ubuntu4.2_amd64.deb ...
Unpacking xxd (2:9.1.2141-1ubuntu4.2) over (2:9.1.2141-1ubuntu4) ...
Preparing to unpack .../07-libnghttp2-14_1.68.0-2ubuntu0.1_amd64.deb ...
Unpacking libnghttp2-14:amd64 (1.68.0-2ubuntu0.1) over (1.68.0-2) ...
Preparing to unpack .../08-openssh-client_1%3a10.2p1-2ubuntu3.2_amd64.deb ...
Unpacking openssh-client (1:10.2p1-2ubuntu3.2) over (1:10.2p1-2ubuntu3) ...
Preparing to unpack .../09-ubuntu-release-upgrader-core_1%3a26.04.18_all.deb ...
Unpacking ubuntu-release-upgrader-core (1:26.04.18) over (1:26.04.16) ...
Preparing to unpack .../10-python3-distupgrade_1%3a26.04.18_all.deb ...
Unpacking python3-distupgrade (1:26.04.18) over (1:26.04.16) ...
Preparing to unpack .../11-rsync_3.4.1+ds1-7ubuntu0.2_amd64.deb ...
Unpacking rsync (3.4.1+ds1-7ubuntu0.2) over (3.4.1+ds1-7) ...
Preparing to unpack .../12-bubblewrap_0.11.1-1ubuntu0.1_amd64.deb ...
Unpacking bubblewrap (0.11.1-1ubuntu0.1) over (0.11.1-1) ...
Preparing to unpack .../13-curl_8.18.0-1ubuntu2.1_amd64.deb ...
Unpacking curl (8.18.0-1ubuntu2.1) over (8.18.0-1ubuntu2) ...
Preparing to unpack .../14-libcurl4t64_8.18.0-1ubuntu2.1_amd64.deb ...
Unpacking libcurl4t64:amd64 (8.18.0-1ubuntu2.1) over (8.18.0-1ubuntu2) ...
Preparing to unpack .../15-libpackagekit-glib2-18_1.3.4-3ubuntu1_amd64.deb ...
Unpacking libpackagekit-glib2-18:amd64 (1.3.4-3ubuntu1) over (1.3.4-3) ...
Preparing to unpack .../16-gir1.2-packagekitglib-1.0_1.3.4-3ubuntu1_amd64.deb ...
Unpacking gir1.2-packagekitglib-1.0 (1.3.4-3ubuntu1) over (1.3.4-3) ...
Preparing to unpack .../17-libavahi-client3_0.8-18ubuntu1.1_amd64.deb ...
Unpacking libavahi-client3:amd64 (0.8-18ubuntu1.1) over (0.8-18ubuntu1) ...
Preparing to unpack .../18-libavahi-common3_0.8-18ubuntu1.1_amd64.deb ...
Unpacking libavahi-common3:amd64 (0.8-18ubuntu1.1) over (0.8-18ubuntu1) ...
Preparing to unpack .../19-libavahi-common-data_0.8-18ubuntu1.1_amd64.deb ...
Unpacking libavahi-common-data:amd64 (0.8-18ubuntu1.1) over (0.8-18ubuntu1) ...
Preparing to unpack .../20-libcurl3t64-gnutls_8.18.0-1ubuntu2.1_amd64.deb ...
Unpacking libcurl3t64-gnutls:amd64 (8.18.0-1ubuntu2.1) over (8.18.0-1ubuntu2) ...
Preparing to unpack .../21-liblcms2-2_2.17-1ubuntu0.2_amd64.deb ...
Unpacking liblcms2-2:amd64 (2.17-1ubuntu0.2) over (2.17-1) ...
Preparing to unpack .../22-snapd_2.75.2+ubuntu26.04.2_amd64.deb ...
Unpacking snapd (2.75.2+ubuntu26.04.2) over (2.74.1+ubuntu26.04.4) ...
Preparing to unpack .../23-packagekit_1.3.4-3ubuntu1_amd64.deb ...
Unpacking packagekit (1.3.4-3ubuntu1) over (1.3.4-3) ...
Setting up libgnutls30t64:amd64 (3.8.12-2ubuntu1.1) ...
Setting up bubblewrap (0.11.1-1ubuntu0.1) ...
Setting up motd-news-config (14ubuntu6.1) ...
Setting up liblcms2-2:amd64 (2.17-1ubuntu0.2) ...
Setting up distro-info-data (0.68ubuntu0.1) ...
Setting up openssh-client (1:10.2p1-2ubuntu3.2) ...
Setting up libnghttp2-14:amd64 (1.68.0-2ubuntu0.1) ...
Setting up libcurl3t64-gnutls:amd64 (8.18.0-1ubuntu2.1) ...
Setting up libpackagekit-glib2-18:amd64 (1.3.4-3ubuntu1) ...
Setting up python3-distupgrade (1:26.04.18) ...
Setting up xxd (2:9.1.2141-1ubuntu4.2) ...
Setting up gir1.2-packagekitglib-1.0 (1.3.4-3ubuntu1) ...
Setting up vim-common (2:9.1.2141-1ubuntu4.2) ...
Setting up libavahi-common-data:amd64 (0.8-18ubuntu1.1) ...
Setting up ubuntu-release-upgrader-core (1:26.04.18) ...
Setting up packagekit (1.3.4-3ubuntu1) ...
Setting up vim-runtime (2:9.1.2141-1ubuntu4.2) ...
Setting up rsync (3.4.1+ds1-7ubuntu0.2) ...
rsync.service is a disabled or a static unit not running, not starting it.
Setting up snapd (2.75.2+ubuntu26.04.2) ...
Installing new version of config file /etc/apparmor.d/usr.lib.snapd.snap-confine.real ...
snapd.failure.service is a disabled or a static unit not running, not starting it.
snapd.gpio-chardev-setup.target is a disabled or a static unit not running, not starting it.
snapd.snap-repair.service is a disabled or a static unit not running, not starting it.
Setting up vim (2:9.1.2141-1ubuntu4.2) ...
Setting up libcurl4t64:amd64 (8.18.0-1ubuntu2.1) ...
Setting up libavahi-common3:amd64 (0.8-18ubuntu1.1) ...
Setting up vim-tiny (2:9.1.2141-1ubuntu4.2) ...
Setting up curl (8.18.0-1ubuntu2.1) ...
Setting up libavahi-client3:amd64 (0.8-18ubuntu1.1) ...
Processing triggers for libc-bin (2.43-2ubuntu2) ...
Processing triggers for man-db (2.13.1-1build1) ...
Processing triggers for dbus (1.16.2-2ubuntu4) ...
Processing triggers for install-info (7.2-5ubuntu2) ...
Processing triggers for hicolor-icon-theme (0.18-2build1) ...
user@DESKTOP-842DJ48:/mnt/c/windows/system32$ curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
  % Total    % Received % Xferd  Average Speed  Time    Time    Time   Current
                                 Dload  Upload  Total   Spent   Left   Speed
100  16555 100  16555   0      0  55706      0                              0
=> Downloading nvm from git to '/home/user/.nvm'
=> Cloning into '/home/user/.nvm'...
remote: Enumerating objects: 428, done.
remote: Counting objects: 100% (428/428), done.
remote: Compressing objects: 100% (354/354), done.
remote: Total 428 (delta 60), reused 194 (delta 46), pack-reused 0 (from 0)
Receiving objects: 100% (428/428), 415.66 KiB | 832.00 KiB/s, done.
Resolving deltas: 100% (60/60), done.
* (HEAD detached at FETCH_HEAD)
  master
=> Compressing and cleaning up git repository

=> Appending nvm source string to /home/user/.bashrc
=> Appending bash_completion source string to /home/user/.bashrc
=> You currently have modules installed globally with `npm`. These will no
=> longer be linked to the active version of Node when you install a new node
=> with `nvm`; and they may (depending on how you construct your `$PATH`)
=> override the binaries of modules installed with `nvm`:

D:\Program Files\nodejs\node_global
+-- apidoc@0.54.0
`-- hexo-cli@4.3.0
=> If you wish to uninstall them at a later point (or re-install them under your
=> `nvm` Nodes), you can remove them from the system Node as follows:

     $ nvm use system
     $ npm uninstall -g a_module

=> Close and reopen your terminal to start using nvm or run the following to use it now:

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"  # This loads nvm
[ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion"  # This loads nvm bash_completion
user@DESKTOP-842DJ48:/mnt/c/windows/system32$ export NVM_DIR="$HOME/.nvm"
$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"user@DESKTOP-842DJ48:/mnt/c/windows/system32$ [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"^C
user@DESKTOP-842DJ48:/mnt/c/windows/system32$ export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
-bash: export: `[': not a valid identifier
-bash: export: `-s': not a valid identifier
-bash: export: `/home/user/.nvm/nvm.sh': not a valid identifier
-bash: export: `]': not a valid identifier
user@DESKTOP-842DJ48:/mnt/c/windows/system32$ [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
user@DESKTOP-842DJ48:/mnt/c/windows/system32$ export NVM_DIR="$HOME/.nvm"
user@DESKTOP-842DJ48:/mnt/c/windows/system32$ [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
user@DESKTOP-842DJ48:/mnt/c/windows/system32$ nvm install --lts
Installing latest LTS version.
Downloading and installing node v24.16.0...
Downloading https://nodejs.org/dist/v24.16.0/node-v24.16.0-linux-x64.tar.xz...
############################################################################################################################################################################################################ 100.0%
Computing checksum with sha256sum
Checksums matched!
Now using node v24.16.0 (npm v11.13.0)
Creating default alias: default -> lts/* (-> v24.16.0)
user@DESKTOP-842DJ48:/mnt/c/windows/system32$ nvm alias default 'lts/*'
default -> lts/* (-> v24.16.0)
user@DESKTOP-842DJ48:/mnt/c/windows/system32$ node -v
v24.16.0
user@DESKTOP-842DJ48:/mnt/c/windows/system32$ npm -v
11.13.0
user@DESKTOP-842DJ48:/mnt/c/windows/system32$ npm config set registry https://registry.npmmirror.com
user@DESKTOP-842DJ48:/mnt/c/windows/system32$ curl -fsSL https://openclaw.ai/install.sh | bash
Preparing installer interface...

  🦞 OpenClaw Installer
  Because Siri wasn't answering at 3AM.

✓ Detected: linux

Install plan
OS: linux
Install method: npm
Requested version: latest

[1/3] Preparing environment
✓ Node.js v24.16.0 found
· Active Node.js: v24.16.0 (/home/user/.nvm/versions/node/v24.16.0/bin/node)
· Active npm: 11.13.0 (/home/user/.nvm/versions/node/v24.16.0/bin/npm)
· Using Node.js runtime at /home/user/.nvm/versions/node/v24.16.0/bin/node
· Using Node.js runtime at /home/user/.nvm/versions/node/v24.16.0/bin/node

[2/3] Installing OpenClaw
✓ Git already installed
· Installing OpenClaw v2026.5.22

✓ OpenClaw npm package installed
✓ OpenClaw installed

[3/3] Finalizing setup

🦞 OpenClaw installed successfully (2026.5.22)!
Cozy. I've already read your calendar. We need to talk.

· Starting setup

│
◇

OpenClaw 2026.5.22 (a374c3a) — The only crab in your contacts you actually want to hear from.

▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
██░▄▄▄░██░▄▄░██░▄▄▄██░▀██░██░▄▄▀██░████░▄▄▀██░███░██
██░███░██░▀▀░██░▄▄▄██░█░█░██░█████░████░▀▀░██░█░█░██
██░▀▀▀░██░█████░▀▀▀██░██▄░██░▀▀▄██░▀▀░█░██░██▄▀▄▀▄██
▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
                       OPENCLAW

┌  OpenClaw setup
│
◇  Security disclaimer ──────────────────────────────────────────────────────────────────────╮
│                                                                                            │
│  OpenClaw is a hobby project and still in beta. Expect sharp edges.                        │
│  By default, OpenClaw is a personal agent: one trusted operator boundary.                  │
│  This bot can read files and run actions if tools are enabled.                             │
│  A bad prompt can trick it into doing unsafe things.                                       │
│                                                                                            │
│  OpenClaw is not a hostile multi-tenant boundary by default.                               │
│  If multiple users can message one tool-enabled agent, they share that delegated tool      │
│  authority.                                                                                │
│                                                                                            │
│  If you're not comfortable with security hardening and access control, don't run           │
│  OpenClaw.                                                                                 │
│  Ask someone experienced to help before enabling tools or exposing it to the internet.     │
│                                                                                            │
│  Recommended baseline                                                                      │
│  - Pairing/allowlists + mention gating.                                                    │
│  - Multi-user/shared inbox: split trust boundaries (separate gateway/credentials, ideally  │
│    separate OS users/hosts).                                                               │
│  - Sandbox + least-privilege tools.                                                        │
│  - Shared inboxes: isolate DM sessions (session.dmScope: per-channel-peer) and keep tool   │
│    access minimal.                                                                         │
│  - Keep secrets out of the agent's reachable filesystem.                                   │
│  - Use the strongest available model for any bot with tools or untrusted inboxes.          │
│                                                                                            │
│  Run regularly                                                                             │
│  openclaw security audit --deep                                                            │
│  openclaw security audit --fix                                                             │
│                                                                                            │
│  Learn more                                                                                │
│  - https://docs.openclaw.ai/gateway/security                                               │
│                                                                                            │
├────────────────────────────────────────────────────────────────────────────────────────────╯
│
◇  I understand this is personal-by-default and shared/multi-user use requires lock-down. Continue?
│  Yes
│
◇  Setup mode
│  QuickStart (recommended)
│
◇  QuickStart ─────────────────────────╮
│                                      │
│  Gateway port: 18789                 │
│  Gateway bind: Loopback (127.0.0.1)  │
│  Gateway auth: Token (default)       │
│  Tailscale exposure: Off             │
│  Direct to chat channels.            │
│                                      │
├──────────────────────────────────────╯
│
◇  Model/auth provider
│  More…
│
◇  Model/auth provider
│  MiniMax
│
◇  MiniMax auth method
│  MiniMax API key (CN)
│
◇  Enter MiniMax CN API key (sk-api- or sk-cp-)
https://platform.minimaxi.com/user-center/basic-information/interface-key
│  ▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪
│
◇  Model configured ──────────────────────────╮
│                                             │
│  Default model set to minimax/MiniMax-M2.7  │
│                                             │
├─────────────────────────────────────────────╯
│
◇  Default model
│  Browse all models
│
│
◇  Default model
│  minimax/MiniMax-M2.7
│
◇  How channels work ───────────────────────────────────────────────────────────────────────╮
│                                                                                           │
│  Inbound DM safety defaults to pairing: unknown senders get a pairing code first.         │
│  Approve with: openclaw pairing approve <channel> <code>                                  │
│  Open/public DMs require dmPolicy="open" plus allowFrom=["*"].                            │
│  For multi-user DMs, isolate sessions with: openclaw config set session.dmScope           │
│  "per-channel-peer" (or "per-account-channel-peer" for multi-account channels).           │
│  Docs: channels/pairing                                                                   │
│                                                                                           │
│  Feishu: 飞书/Lark enterprise messaging with doc/wiki/drive tools.                        │
│  WeCom: Enterprise messaging and documents, scheduling, task tools.                       │
│  Google Chat: Google Workspace Chat app with HTTP webhook.                                │
│  Nostr: Decentralized protocol; encrypted DMs via NIP-04.                                 │
│  Microsoft Teams: Teams SDK; enterprise support.                                          │
│  Mattermost: self-hosted Slack-style chat; install the plugin to enable.                  │
│  Nextcloud Talk: Self-hosted chat via Nextcloud Talk webhook bots.                        │
│  Matrix: open protocol; install the plugin to enable.                                     │
│  LINE: LINE Messaging API webhook bot.                                                    │
│  Weixin: Personal WeChat messaging via QR-code login.                                     │
│  Zalo: Vietnam-focused messaging platform with Bot API.                                   │
│  ClickClack: self-hosted chat via first-class ClickClack bot tokens.                      │
│  Yuanbao: Tencent Yuanbao AI assistant conversation channel.                              │
│  Zalo Personal: Zalo personal account via QR code login.                                  │
│  Synology Chat: Connect your Synology NAS Chat to OpenClaw with full agent capabilities.  │
│  Tlon: decentralized messaging on Urbit; install the plugin to enable.                    │
│  Discord: very well supported right now.                                                  │
│  iMessage: Local iMessage/SMS through the imsg bridge, including private API message      │
│  actions when enabled.                                                                    │
│  IRC: classic IRC networks with DM/channel routing and pairing controls.                  │
│  QQ Bot: connect to QQ via official QQ Bot API with group chat and direct message         │
│  support.                                                                                 │
│  Signal: signal-cli linked device; more setup (David Reagans: "Hop on Discord.").         │
│  Slack: supported (Socket Mode).                                                          │
│  Telegram: simplest way to get started — register a bot with @BotFather and get going.    │
│  Twitch: Twitch chat integration                                                          │
│  WhatsApp: works with your own number; recommend a separate phone + eSIM.                 │
│                                                                                           │
├───────────────────────────────────────────────────────────────────────────────────────────╯
│
◇  Select channel (QuickStart)
│  Skip for now
Updated config: ~/.openclaw/openclaw.json
Workspace OK: ~/.openclaw/workspace
Sessions OK: ~/.openclaw/agents/main/sessions
│
◇  Web search ─────────────────────────────────────────────────────────────────╮
│                                                                              │
│  Web search lets your agent look things up online.                           │
│  Choose a provider. Some providers need an API key, and some work key-free.  │
│  Docs: https://docs.openclaw.ai/tools/web                                    │
│                                                                              │
├──────────────────────────────────────────────────────────────────────────────╯
│
◇  Search provider
│  MiniMax Search
│
◇  MiniMax Token Plan key or OAuth token
│  ▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪▪
│
◇  Skills status ─────────────╮
│                             │
│  Eligible: 15               │
│  Missing requirements: 36   │
│  Unsupported on this OS: 7  │
│  Blocked by allowlist: 0    │
│                             │
├─────────────────────────────╯
│
◇  Configure skills now? (recommended)
│  No
│
◇  Hooks ──────────────────────────────────────────────────────────────────╮
│                                                                          │
│  Hooks let you automate actions when agent commands are issued.          │
│  Example: Save session context to memory when you issue /new or /reset.  │
│                                                                          │
│  Learn more: https://docs.openclaw.ai/automation/hooks                   │
│                                                                          │
├──────────────────────────────────────────────────────────────────────────╯
│
◇  Enable hooks?
│  💾 session-memory
│
◇  Hooks Configured ─────────────────╮
│                                    │
│  Enabled 1 hook: session-memory    │
│                                    │
│  You can manage hooks later with:  │
│    openclaw hooks list             │
│    openclaw hooks enable <name>    │
│    openclaw hooks disable <name>   │
│                                    │
├────────────────────────────────────╯
│
◇  Systemd ────────────────────────────────────────────────────────────────────────────────╮
│                                                                                          │
│  Linux installs use a systemd user service by default. Without lingering, systemd stops  │
│  the user session on logout/idle and kills the Gateway.                                  │
│  Enabling lingering now (may require sudo; writes /var/lib/systemd/linger).              │
│                                                                                          │
├──────────────────────────────────────────────────────────────────────────────────────────╯
│
◇  Systemd ─────────────────────────────╮
│                                       │
│  Enabled systemd lingering for user.  │
│                                       │
├───────────────────────────────────────╯
│
◇  Gateway service runtime ────────────────────────────────────────────╮
│                                                                      │
│  QuickStart uses Node for the Gateway service (stable + supported).  │
│                                                                      │
├──────────────────────────────────────────────────────────────────────╯
│
◓  Installing Gateway service...
Installed systemd service: /home/user/.config/systemd/user/openclaw-gateway.service
◇  Gateway service installed.
│
◇
Gateway event loop: degraded reasons=event_loop_utilization,cpu max=508ms p99=508ms util=0.999 cpu=1.38
Agents: main (default)
Heartbeat interval: 30m (main)
Session store (main): /home/user/.openclaw/agents/main/sessions/sessions.json (0 entries)
│
◇  Optional apps ────────────────────────╮
│                                        │
│  Add nodes for extra features:         │
│  - macOS app (system + notifications)  │
│  - iOS app (camera/canvas)             │
│  - Android app (camera/canvas)         │
│                                        │
├────────────────────────────────────────╯
│
◇  Control UI ─────────────────────────────────────────────────────────────────────╮
│                                                                                  │
│  Web UI: http://127.0.0.1:18789/                                                 │
│  Web UI (with token):                                                            │
│  http://127.0.0.1:18789/#token=a362e57bda01e35240958f3cbe0dbe4ab6088ccea7e8bd0a  │
│  Gateway WS: ws://127.0.0.1:18789                                                │
│  Gateway: reachable                                                              │
│  Docs: https://docs.openclaw.ai/web/control-ui                                   │
│                                                                                  │
├──────────────────────────────────────────────────────────────────────────────────╯
│
◇  Hatch your agent ───────────────────────────────────────────────────╮
│                                                                      │
│  Your workspace is ready.                                            │
│  The first Terminal chat run will send: "Wake up, my friend!"        │
│  Edit BOOTSTRAP.md later to change how the agent introduces itself.  │
│                                                                      │
├──────────────────────────────────────────────────────────────────────╯
│
◇  Token ────────────────────────────────────────────────────────────────────────────────────╮
│                                                                                            │
│  Gateway token: shared auth for the Gateway + Control UI.                                  │
│  Stored in: $OPENCLAW_CONFIG_PATH (default: ~/.openclaw/openclaw.json) under               │
│  gateway.auth.token, or in OPENCLAW_GATEWAY_TOKEN.                                         │
│  View token: openclaw config get gateway.auth.token                                        │
│  Generate token: openclaw doctor --generate-gateway-token                                  │
│  Web UI keeps dashboard URL tokens in memory for the current tab and strips them from the  │
│  URL after load.                                                                           │
│  Open the dashboard anytime: openclaw dashboard --no-open                                  │
│  If prompted: paste the token into Control UI settings (or use the tokenized dashboard     │
│  URL).                                                                                     │
│                                                                                            │
├────────────────────────────────────────────────────────────────────────────────────────────╯
│
◇  How do you want to hatch your agent?
│  Hatch in Browser
│
◇  Dashboard ready ──────────────────────────────────────────────────────────────────╮
│                                                                                    │
│  Dashboard link (with token):                                                      │
│  http://127.0.0.1:18789/#token=a362e57bda01e35240958f3cbe0dbe4ab6088ccea7e8bd0a    │
│  Copy/paste this URL in a browser on this machine to control OpenClaw.             │
│  No GUI detected. Open from your computer:                                         │
│  ssh -N -L 18789:127.0.0.1:18789 user@<host>                                       │
│  Then open:                                                                        │
│  http://localhost:18789/                                                           │
│  http://localhost:18789/#token=a362e57bda01e35240958f3cbe0dbe4ab6088ccea7e8bd0a    │
│  BYOH note: lan, tailnet, and custom bind are currently IPv4-only.                 │
│  If your host is IPv6-only, use an IPv4 sidecar or proxy in front of the Gateway.  │
│  Docs:                                                                             │
│  https://docs.openclaw.ai/gateway/remote                                           │
│  https://docs.openclaw.ai/web/control-ui                                           │
│                                                                                    │
├────────────────────────────────────────────────────────────────────────────────────╯
│
◇  Workspace backup ────────────────────────────────────────╮
│                                                           │
│  Back up your agent workspace.                            │
│  Docs: https://docs.openclaw.ai/concepts/agent-workspace  │
│                                                           │
├───────────────────────────────────────────────────────────╯
│
◇  Security disclaimer ───────────────────────────────────────────╮
│                                                                 │
│  Running agents on your computer is risky — harden your setup:  │
│  https://docs.openclaw.ai/security                              │
│                                                                 │
├─────────────────────────────────────────────────────────────────╯
│
◇  Shell completion ────────────────────────────────────────────────────────╮
│                                                                           │
│  Shell completion installed. Restart your shell or run: source ~/.bashrc  │
│                                                                           │
├───────────────────────────────────────────────────────────────────────────╯
│
◇  Web search ──────────────────────────────────────────────────────────────────╮
│                                                                               │
│  Web search is enabled, so your agent can look things up online when needed.  │
│                                                                               │
│  Provider: MiniMax Search                                                     │
│  API key: stored in config.                                                   │
│  Docs: https://docs.openclaw.ai/tools/web                                     │
│                                                                               │
├───────────────────────────────────────────────────────────────────────────────╯
│
◇  What now ─────────────────────────────────────────────────────────────╮
│                                                                        │
│  What now: https://openclaw.ai/showcase ("What People Are Building").  │
│                                                                        │
├────────────────────────────────────────────────────────────────────────╯
│
└  Onboarding complete. Use the dashboard link above to control OpenClaw.

 

posted @ 2026-05-26 11:24  雪山上的蒲公英  阅读(1)  评论(0)    收藏  举报
/* 返回顶部代码 */