文档/故障排查6 分钟

安装程序错误(install.sh 和 install.ps1)

Wantastic 安装程序停止时输出的每条消息、其含义以及最简单的修复方法。

完成后你将得到

安装程序结束时输出 "Done. wantasticd <version> is installed and running.",且设备已认领。

开始之前

  • Linux 和 macOS 上使用 sudo,OpenWrt 和 Alpine 上使用 root shell,Windows 上以管理员身份运行 PowerShell。

开始之前

  • 以 "Error:" 开头的行会使安装程序停止,以 "Warning:" 开头的行不会。
  • 重复运行安装程序是安全的。它会保留你的配置,并将旧的二进制文件保存为 .previous。
  • 大多数错误都可以通过使用 sudo 运行快速安装来解决,命令与下方完全一致。
Linux 和 macOSbash
curl -fsSL https://get.wantastic.app/install.sh | sudo sh; sudo wantasticd genkey
OpenWrt 和 Alpine(以 root 身份)bash
wget -qO- https://get.wantastic.app/install.sh | sh; wantasticd genkey

检查要点

  1. 1权限错误("not writable"、"needs root"):在 sh 前加上 sudo。
  2. 2下载错误("HTTP …"、"wget failed"、"latest version"):检查 DNS、HTTPS 和时钟。
  3. 3最后出现服务错误:运行 genkey,认领设备,然后重启服务。
失败:没有 sudo
$ curl -fsSL https://get.wantastic.app/install.sh | sh
Platform: linux/amd64
Error: /usr/local/bin is not writable, but / is already read-write. Run this installer as root.1
  1. 1缺少 sudo
没有 sudo,安装程序无法写入 /usr/local/bin。
已修复:在 sh 前加 sudo,然后运行 genkey
$ curl -fsSL https://get.wantastic.app/install.sh | sudo sh; sudo wantasticd genkey
Done. wantasticd v1.0.54+377f3c0 is installed and running.
Claim URL: https://console.wantastic.app/#desktop?claim_public_key=Vd3hK1oQ…&wantastic_server=https://console.wantastic.app1
Device claimed. Configuration saved to /etc/wantastic/config.conf2
$ sudo systemctl restart wantasticd
  1. 1打开并点击 Claim Device
  2. 2按 Ctrl+C
使用 Claim URL 或二维码认领设备,按 Ctrl+C,然后重启。

速查表

错误最简单的修复方法
Unsupported OS: X在 Windows 上请使用 install.ps1。
Unsupported architecture: X从匹配的 tarball 手动安装。
Error: on macOS the installer needs root.在 sh 前加上 sudo。
Error: <dir> is not writable…在 sh 前加上 sudo,或以 root 身份运行。
Error: could not remount <mount> read-write…以 root 身份运行;锁定的固件需要一个可写路径。
Error: <dir> is still not writable after remounting <mount>释放闪存空间。
Error: curl or wget required安装 curl 或 wget。
HTTP <code> downloading <url> / wget failed: <url>修复 DNS、CA 证书包、时钟或代理。
Error: could not determine latest version检查能否访问 get.wantastic.app。
Error: invalid release version: X登录强制门户,或绕过代理。
Error: binary not found in archive释放 /tmp 空间后重试。
Error: downloaded binary does not report target version VCPU 构建版本不匹配,或 /tmp 挂载为 noexec。
Skipping login… / … is empty / service did not start运行 genkey,认领设备,重启服务。
Error: OpenRC service was not enabledrc-update add wantasticd default。
Bootstrap failed: 5: Input/output error先执行 launchctl bootout,再重新运行。

验证结果

安装程序输出 "Done. wantasticd <version> is installed and running."
点击 Claim Device 后,genkey 输出 "Device claimed"。
重启后 wantasticd status 显示 Connected。

错误与解决方法

安装程序拒绝在 Windows 上运行。Unsupported OS: Xinstall.sh
原因

install.sh 仅支持 Linux 和 macOS。

解决方法

请改用 install.ps1:以管理员身份打开 PowerShell 并粘贴这一行。

PowerShell(管理员)powershell
irm https://get.wantastic.app/install.ps1 | iex
验证: 安装程序提示服务已作为 Windows 服务安装并运行。
无法识别架构。Unsupported architecture: X Download manually from https://get.wantastic.appinstall.sh
原因

该 CPU 类型(例如 ppc64、s390x 或 loong64)没有自动构建版本。

解决方法

下载匹配的 tarball 并安装,然后使用 genkey 认领设备。

Shellbash
TAG=$(curl -fsSL https://get.wantastic.app/latest | cut -d+ -f1)
curl -fsSLO https://get.wantastic.app/$TAG/wantasticd-linux-<arch>.tar.gz
tar -xzf wantasticd-linux-<arch>.tar.gz
sudo install -m 755 wantasticd /usr/local/bin/
sudo wantasticd genkey
验证: genkey 输出 "Device claimed"。
macOS 安装立即停止。Error: on macOS the installer needs root.install.sh (macOS)
原因

安装程序没有使用 sudo 运行。

解决方法

在 sh 前加上 sudo 运行快速安装,然后认领设备。

  1. 1运行该命令。
  2. 2打开 Claim URL,登录并点击 Claim Device。
  3. 3出现 "Device claimed" 后,按 Ctrl+C。
  4. 4运行:sudo launchctl kickstart -k system/com.wantastic.wantasticd
Terminalbash
curl -fsSL https://get.wantastic.app/install.sh | sudo sh; sudo wantasticd genkey
验证: wantasticd status 显示 Connected。
安装目录不可写。Error: <dir> is not writable. Run this installer as root.install.sh
原因

安装程序没有以 root 身份运行。

解决方法

使用 sudo 运行快速安装(在 OpenWrt 和 Alpine 上,以 root 身份登录)。

Shellbash
curl -fsSL https://get.wantastic.app/install.sh | sudo sh; sudo wantasticd genkey
验证: 安装程序输出 "Done.",genkey 显示 Claim URL。
文件系统正常,但 Linux 单行命令仍然失败。Error: <dir> is not writable, but <mount> is already read-write. Run this installer as root.install.sh
原因

sudo 加在了 curl 前面或被遗漏,导致 sh 以普通用户身份运行。

解决方法

将 sudo 加在 sh 前面,而不是 curl 前面。

Shellbash
curl -fsSL https://get.wantastic.app/install.sh | sudo sh; sudo wantasticd genkey
验证: 安装程序输出 "Done."
安装程序无法将只读文件系统改为可写。Error: could not remount <mount> read-write. Run as root or unlock the filesystem.install.sh(嵌入式)
原因

固件为只读或已锁定,或你不是 root。

解决方法

以 root 身份运行。如果固件仍为只读,请将二进制文件手动安装到可写目录,并设置 WANTASTIC_CONFIG_DIR。

验证: wantasticd version 可以运行。
重新挂载成功,但安装程序仍无法写入。Error: <dir> is still not writable after remounting <mount>install.sh
原因

闪存或分区已满。

解决方法

释放约 15 MB 空间,然后重新运行安装程序。

Shellbash
df -h
df -h /overlay
验证: 安装程序输出 "Done."
结束时出现只读恢复警告。Warning: could not remount <mount> read-onlyinstall.sh
原因

安装程序已将文件系统改为可写,但无法切换回只读。安装本身已成功。

解决方法

方便时重启设备。

验证: 重启后 mount 显示该文件系统为 ro。
安装程序找不到挂载点。Error: could not determine the mount containing <dir>install.sh
原因

设备的挂载布局不常见。

解决方法

将二进制文件手动安装到 PATH 中的可写目录,然后运行 genkey。

验证: wantasticd version 正常运行。
没有下载工具。Error: curl or wget requiredinstall.sh
原因

系统镜像中既没有 curl 也没有 wget。

解决方法

安装其中一个,然后重新运行快速安装。

Shellbash
apt-get install -y curl                          # Debian/Ubuntu
apk add curl ca-certificates                     # Alpine
opkg update && opkg install wget-ssl ca-bundle   # OpenWrt
验证: curl --version 或 wget --version 可以正常运行。
下载失败并返回 HTTP 状态码。HTTP <code> downloading <url>install.sh
原因

DNS、HTTPS(缺少 CA 证书包或时钟错误)、代理或防火墙阻止了下载。

解决方法

使用以下命令检查 DNS、时钟和 HTTPS。

Shellbash
nslookup get.wantastic.app
date -u
curl -v https://get.wantastic.app/latest
验证: 最后一条命令输出类似 v1.0.54+377f3c0 的版本号。
在 OpenWrt 或 BusyBox 上 wget 下载失败。wget failed: <url>install.sh
原因

wget 不支持 HTTPS、缺少 CA 证书包,或时钟错误。

解决方法

安装 HTTPS 支持并设置时钟。

Shellbash
opkg update && opkg install wget-ssl ca-bundle
ntpd -q -p pool.ntp.org
验证: wget -qO- https://get.wantastic.app/latest 输出版本号。
无法获取最新版本。Error: could not determine latest versioninstall.sh(install.ps1:"Could not determine latest version.")
原因

设备无法访问 https://get.wantastic.app/latest。

解决方法

检查 DNS、HTTPS 和代理,然后重试。

Shellbash
curl -fsSL https://get.wantastic.app/latest
验证: 输出了版本号字符串。
版本号看起来像一个网页。Error: invalid release version: Xinstall.sh(install.ps1:"Invalid release version: X")
原因

强制门户或代理返回了网页,而不是版本号。

解决方法

登录强制门户,或让 get.wantastic.app 绕过代理。

验证: curl -fsSL https://get.wantastic.app/latest 只输出版本号。
压缩包中没有二进制文件。Error: binary not found in archiveinstall.sh(install.ps1:"wantasticd.exe not found in archive.")
原因

下载被中断,通常是因为 /tmp 已满。

解决方法

释放 /tmp 空间,然后重新运行安装程序。

Shellbash
df -h /tmp
验证: 安装程序输出 "wantasticd <version> installed."
下载后二进制文件无法运行。Error: downloaded binary does not report target version V Reported: …install.sh
原因

/tmp 以 noexec 挂载,或 CPU 无法运行该构建版本(ARMv6 Pi Zero/Pi 1、无 FPU 的 MIPS)。

解决方法

使用其他临时目录。在 ARMv6 或无 FPU 的 MIPS 上,请改用 WireGuard 配置。

Shellbash
sudo mkdir -p /var/tmp/wt && curl -fsSL https://get.wantastic.app/install.sh | sudo TMPDIR=/var/tmp/wt sh; sudo wantasticd genkey
验证: wantasticd version 输出目标版本号。
重新安装时安装程序跳过了登录。Config already exists at <cfg> — skipping login.install.sh
原因

这是正常现象。安装程序从不覆盖已有配置。

解决方法

如需保留该设备,无需任何操作。如需将其注册为新设备,请删除配置并使用新密钥重新认领。

Shellbash
sudo rm /etc/wantastic/config.conf
sudo wantasticd genkey --force
# after "Device claimed": press Ctrl+C, then:
sudo systemctl restart wantasticd
验证: genkey 输出 "Device claimed"。
安装期间登录步骤失败。Login failed — <cfg> is empty. Edit it and re-run: wantasticd logininstall.sh
原因

令牌被拒绝或无法连接控制台。原因会打印在此行上方。

解决方法

跳过令牌,使用 genkey 认领设备。

Shellbash
sudo wantasticd genkey
# after "Device claimed": press Ctrl+C, then:
sudo systemctl restart wantasticd
验证: wantasticd status 显示 Connected。
安装程序在没有凭据的情况下运行。Skipping login. Run 'wantasticd login' to authenticate.install.sh
原因

快速安装出现这种情况是正常的。设备仍需认领。

解决方法

运行 genkey,认领设备,按 Ctrl+C,然后重启服务。

Shellbash
sudo wantasticd genkey
# after "Device claimed": press Ctrl+C, then:
sudo systemctl restart wantasticd
验证: wantasticd status 显示 Connected。
同时传入了两个服务器参数。Warning: both --server and --portal-url were provided; using --portal-url.install.sh
原因

这两个参数相互冲突。

解决方法

只传入其中一个:证书有效时使用 --portal-url,自签名证书使用 --server。

验证: 下次运行时警告消失。
systemd 步骤失败。Error: systemd service did not startinstall.sh
原因

设备尚未认领,因此配置为空。认领前出现这种情况属于预期。

解决方法

运行 genkey,认领设备,按 Ctrl+C,然后重启服务。

Shellbash
sudo wantasticd genkey
# after "Device claimed": press Ctrl+C, then:
sudo systemctl restart wantasticd
验证: systemctl is-active wantasticd 打印 active。
systemd 单元未启用。Error: systemd service was not enabledinstall.sh
原因

该单元已被屏蔽(masked),或 /etc 为只读。

解决方法

取消屏蔽并启用该服务。

Shellbash
sudo systemctl unmask wantasticd
sudo systemctl enable --now wantasticd
验证: systemctl is-enabled wantasticd 输出 enabled。
容器被识别为 systemd 环境。System has not been booted with systemd as init systemsystemctl(容器内)
原因

容器中有 systemd 文件,但并未运行 systemd。

解决方法

将 wantasticd 作为容器命令在前台运行,并提供 /dev/net/tun 和 NET_ADMIN。

Shellbash
wantasticd connect --config /etc/wantastic/config.conf
验证: 容器内 wantasticd status 显示 Connected。
OpenWrt procd 步骤失败。Error: procd service did not become healthyinstall.sh (OpenWrt)
原因

设备尚未认领,或缺少 kmod-tun。

解决方法

安装 kmod-tun,使用 genkey 认领设备,然后重启服务。

Shell (root)bash
opkg update && opkg install kmod-tun
wantasticd genkey
# after "Device claimed": press Ctrl+C, then:
/etc/init.d/wantasticd restart
验证: wantasticd status 显示 Connected。
缺少 procd 脚本。Error: procd service script was not installedinstall.sh (OpenWrt)
原因

闪存已满或为只读,导致 /etc/init.d 不可写。

解决方法

释放闪存空间,然后重新运行快速安装。

Shell (root)bash
df -h /overlay
wget -qO- https://get.wantastic.app/install.sh | sh; wantasticd genkey
验证: /etc/init.d/wantasticd 已存在。
Alpine 服务未启用。Error: OpenRC service was not enabledinstall.sh (Alpine)
原因

rc-update 失败。

解决方法

手动启用并启动该服务。

Shell (root)bash
rc-update add wantasticd default
rc-service wantasticd start
验证: rc-service wantasticd status 显示 started。
没有受支持的 init 系统。Unknown init system — start manually: wantasticd connect --config <cfg>install.sh
原因

安装程序未找到 systemd、procd、OpenRC、SysV 或 /etc/init.d。

解决方法

将打印出的命令添加到你的开机启动方式中,例如 rc.local。

验证: 重启后 wantasticd status 显示 Connected。
macOS 安装程序提示服务未能保持运行(设备认领之前)。Error: wantasticd did not stay running. Last log lines:install.sh (macOS)
原因

认领前配置为空,因此服务暂时无法启动。全新安装时出现这种情况属于预期。

解决方法

忽略该消息。运行 genkey,认领设备,按 Ctrl+C,然后重启服务。

Terminalbash
sudo wantasticd genkey
# after "Device claimed": press Ctrl+C, then:
sudo launchctl kickstart -k system/com.wantastic.wantasticd
验证: sudo launchctl print system/com.wantastic.wantasticd 显示 state = running。
plist 检查失败。Error: invalid <plist>install.sh (macOS)
原因

生成的 LaunchDaemon 文件已损坏。

解决方法

卸载后重新运行快速安装。

Terminalbash
curl -fsSL https://get.wantastic.app/install.sh | sudo sh -s -- --uninstall
curl -fsSL https://get.wantastic.app/install.sh | sudo sh; sudo wantasticd genkey
验证: 安装程序输出 "Service registered with launchd and running"。
macOS 上出现签名警告。Warning: could not ad-hoc sign <bin>install.sh (macOS)
原因

codesign 工具缺失或执行失败。

解决方法

手动为二进制文件签名。

Terminalbash
xcode-select --install
sudo codesign -f -s - /usr/local/bin/wantasticd
验证: codesign -dv /usr/local/bin/wantasticd 显示 Signature=adhoc。
macOS 重新安装时出现 launchctl 错误。Bootstrap failed: 5: Input/output errorlaunchctl (macOS)
原因

旧服务仍在停止过程中。

解决方法

移除旧服务,然后重新运行快速安装。

Terminalbash
sudo launchctl bootout system/com.wantastic.wantasticd
curl -fsSL https://get.wantastic.app/install.sh | sudo sh; sudo wantasticd genkey
验证: 安装程序输出 "Done."

继续阅读

仍然无法解决?

请通过邮件发送设备名称、平台和完整的错误文本。切勿发送令牌、密钥或密码。

hello@wantastic.app