解决 Dify v1.13.3 安装插件失败的问题
📅 发布日期:2026年4月8日
🖥️ 适用版本:Dify Community v1.13.3
💡 适用人群:运维工程师、技术爱好者
📌 问题现象
部署环境
操作系统:Ubuntu 24.04.4 x86_64 硬件平台:阿里云 ECS 服务器 部署方式:Docker
在 Ubuntu 24.04.4 操作系统以 Docker 方式部署 Dify Community v1.13.3(官方下载地址)。安装成功后,首先配置大模型,当安装“通义”「langgenius/tongyi」插件时失败,报错如下:
failed to launch plugin: failed to install dependencies:
failed to install dependencies: signal: killed, output:
DEBUG uv 0.9.26 DEBUG Acquired shared lock for `/root/.cache/uv` DEBUG Found project root: `/app/storage/cwd/langgenius/tongyi-0.1.35@7dd9436c26b97b3147840f7c48d50392395eeab282372dc2cec56c47f1a1844e`
DEBUG No workspace root found, using project root DEBUG Acquired exclusive lock for `/app/storage/cwd/langgenius/tongyi-0.1.35@7dd9436c26b97b3147840f7c48d50392395eeab282372dc2cec56c47f1a1844e`
DEBUG ...ac0fa653d126c9204ade96b819c936e136c5e8a6897eee9c/socksio-1.0.0-py3-none-any.whl
DEBUG Sending fresh GET request for: https://files.pythonhosted.org/packages/10/cb/f2ad4230dc2eb1a74edf38f1a38b9b52277f75bef262d8908e60d957e13c/blinker-1.9.0-py3-none-any.whl
DEBUG Sending fresh GET request for: https://files.pythonhosted.org/packages/c2/b0/956902e5e1302f8c5d124e219c6bf214e2649f92ad5fce85b05c039a04c9/zope_event-6.1-py3-none-any.whl
init process exited due to no activity for 120 seconds failed to init environment
🔍 问题分析
从错误信息中可以清晰地看到:
-
超时被 Kill:uv 在从 files.pythonhosted.org下载 Python 包时,超过 120 秒无活动被系统 Kill -
根因:这是典型的网络问题 —— ECS 服务器无法正常访问 PyPI 官方源,导致下载超时
解决方案:配置 uv 使用国内镜像源,如阿里云、清华大学。
✅ 解决方法
步骤 1:进入容器 plugin_daemon 内部的命令行
docker compose exec plugin_daemon sh
步骤 2:创建配置目录和文件
mkdir -p /root/.config/uv
cat > /root/.config/uv/uv.toml << 'EOF'
index-url = "https://mirrors.aliyun.com/pypi/simple/"
extra-index-url = ["https://pypi.tuna.tsinghua.edu.cn/simple/"]
EOF
步骤 3:验证配置是否生效
/usr/local/bin/uv pip install --dry-run requests 2>&1 | head -10
步骤 4:退出容器并重启服务
# 退出容器
exit
# 进入 Dify 安装目录
cd /dify-1.13.3/docker
# 重启 plugin_daemon
docker compose restart plugin_daemon
# 确认服务状态
docker compose ps plugin_daemon
✨ 验证结果
完成以上步骤后,就可以成功安装插件了!🎉
📝 总结
|
|
|
|---|---|
| 问题根因 |
|
| 解决思路 |
|
| 关键文件 |
/root/.config/uv/uv.toml |
| 生效方式 |
|
夜雨聆风