新手部署
启动与更新问题排查
常见环境缺失、Git 更新冲突、协议连接失败与 WebUI 访问排查
遇到报错先别慌,下面按启动、更新、连接三个阶段列了最常踩的坑和对应解法。
一、底层环境缺失
1. ImportError: DLL load failed while importing ...
常见于挂机宝、Windows Server 或精简版虚拟机,报错类似:
ImportError: DLL load failed while importing _sqlite3: 找不到指定的模块。
# 或提示缺少 MSVCP140.dll / VCRUNTIME140.dll解法:装微软官方运行库 VC_redist.x64.exe,装完重启终端再跑。
2. 'node' 不是内部或外部命令 / SnowLuma 闪退
系统没装 Node.js 或环境变量没生效。
winget install OpenJS.NodeJS.LTS装完关掉终端重开,确认 node -v 能正常输出版本号。
3. FileNotFoundError: ... 'ffmpeg' / 语音发不出去
缺少 FFmpeg:
- Windows:执行
winget install Gyan.FFmpeg,或手动下载并把bin目录加进系统环境变量Path。 - Linux:
sudo apt install -y ffmpeg
装完在新终端跑 ffmpeg -version 验证。
二、无损更新与配置合并
Eridanus 自带配置合并脚本 tool.py,更新时会自动把旧配置备份为 .bak,只补入新版本增加的字段,你改过的 Key 和开关都会保留。
- Windows:直接双击根目录的
更新脚本.bat。 - Linux:
cd /opt/Eridanus source .venv/bin/activate git pull python tool.py sudo systemctl restart eridanus
三、常见更新报错
1. Git 连不上 GitHub / SSL 握手超时
如果本地开了代理,给 Git 配上对应端口(假设本地代理端口是 7890):
git config --global http.proxy http://127.0.0.1:7890
git config --global https.proxy http://127.0.0.1:7890不用代理时记得清掉:
git config --global --unset http.proxy
git config --global --unset https.proxy也可以在 basic_config.yaml 里把更新源切到国内 GitCode 镜像:
# 0 为 GitHub,1 为 GitCode 国内源
git_update_source: 12. Git 提示本地修改冲突
报错:error: Your local changes to the following files would be overwritten by merge...
- 想保留自己的代码改动:
git stash git pull git stash pop - 不需要保留本地源码改动,直接覆盖:
git reset --hard HEAD git pull
四、启动与连接排查
1. ModuleNotFoundError: No module named ...
要么没进虚拟环境,要么更新后加了新依赖。进虚拟环境重装一次:
# Windows
.\.venv\Scripts\activate
pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
# Linux
source .venv/bin/activate
pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple2. 协议端连不上(Connection Refused)
按顺序核对这五项:
- 协议端是否已启动并成功登录 QQ。
- 协议端开的是不是 正向 WebSocket 服务(不是反向)。
- 端口是否一致:协议端监听端口和
basic_config.yaml里的ws_link默认都是3001(Milky 默认3002)。 - Access Token 是否两边一致(本地跑建议两边都留空)。
- 跨机器或容器部署时,别用
127.0.0.1,填实际内网 IP 并在防火墙放行端口。
3. WebUI 打不开
- 默认地址是
http://127.0.0.1:5007; - 检查
basic_config.yaml里webui.enable是否为true; - 云服务器需在控制台安全组放行 TCP
5007端口。