Dify安装插件报错如何处理
查看报错日志
docker logs -f docker-plugin_daemon-1
报错日志如下
2025/11/26 09:30:01 full_duplex.go:59: [INFO]init environment for plugin bowenliang123/md_exporter:2.1.0
2025/11/26 09:30:02 full_duplex.go:65: [ERROR]init environment failed: failed to install dependencies: exit status 1, output: Resolved 82 packages in 25ms
Building pycairo==1.29.0
× Failed to build `pycairo==1.29.0`
├─▶ The build backend returned an error
╰─▶ Call to `mesonpy.build_wheel` failed (exit status: 1)
[stdout]
+ meson setup
/root/.cache/uv/sdists-v9/index/46901b1a4cb2cba0/pycairo/1.29.0/yfqQiA982PUk2EuihPGto/src
/root/.cache/uv/sdists-v9/index/46901b1a4cb2cba0/pycairo/1.29.0/yfqQiA982PUk2EuihPGto/src/.mesonpy-ykyowt_t
-Dbuildtype=release -Db_ndebug=if-release
-Db_vscrt=md -Dwheel=true -Dtests=false
--native-file=/root/.cache/uv/sdists-v9/index/46901b1a4cb2cba0/pycairo/1.29.0/yfqQiA982PUk2EuihPGto/src/.mesonpy-ykyowt_t/meson-python-native-file.ini
The Meson build system
Version: 1.9.1
Source dir:
/root/.cache/uv/sdists-v9/index/46901b1a4cb2cba0/pycairo/1.29.0/yfqQiA982PUk2EuihPGto/src
Build dir:
/root/.cache/uv/sdists-v9/index/46901b1a4cb2cba0/pycairo/1.29.0/yfqQiA982PUk2EuihPGto/src/.mesonpy-ykyowt_t
Build type: native build
Project name: pycairo
Project version: 1.29.0
C compiler for the host machine: cc (gcc 13.3.0 "cc (Ubuntu
13.3.0-6ubuntu2~24.04) 13.3.0")
C linker for the host machine: cc ld.bfd 2.42
Host machine cpu family: x86_64
Host machine cpu: x86_64
Program python3 found: YES
(/root/.cache/uv/builds-v0/.tmpTyOatz/bin/python)
Compiler for C supports arguments -Wall: YES
Compiler for C supports arguments -Warray-bounds: YES
Compiler for C supports arguments -Wcast-align: YES
Compiler for C supports arguments -Wconversion: YES
Compiler for C supports arguments -Wextra: YES
Compiler for C supports arguments -Wformat=2: YES
Compiler for C supports arguments -Wformat-nonliteral: YES
Compiler for C supports arguments -Wformat-security: YES
Compiler for C supports arguments -Wimplicit-function-declaration: YES
Compiler for C supports arguments -Winit-self: YES
Compiler for C supports arguments -Wmissing-format-attribute: YES
Compiler for C supports arguments -Wmissing-noreturn: YES
Compiler for C supports arguments -Wnested-externs: YES
Compiler for C supports arguments -Wold-style-definition: YES
Compiler for C supports arguments -Wpacked: YES
Compiler for C supports arguments -Wpointer-arith: YES
Compiler for C supports arguments -Wreturn-type: YES
Compiler for C supports arguments -Wshadow: YES
Compiler for C supports arguments -Wsign-compare: YES
Compiler for C supports arguments -Wstrict-aliasing: YES
Compiler for C supports arguments -Wundef: YES
Compiler for C supports arguments -Wunused-but-set-variable: YES
Compiler for C supports arguments -Wswitch-default: YES
Compiler for C supports arguments -Wno-missing-field-initializers: YES
Compiler for C supports arguments -Wno-unused-parameter: YES
Compiler for C supports arguments -fno-strict-aliasing: YES
Compiler for C supports arguments -fvisibility=hidden: YES
Did not find pkg-config by name 'pkg-config'
Found pkg-config: NO
Did not find CMake 'cmake'
Found CMake: NO
Run-time dependency cairo found: NO
../cairo/meson.build:31:12: ERROR: Dependency lookup for cairo with
method 'pkgconfig' failed: Pkg-config for machine host machine not
found. Giving up.
A full log can be found at
/root/.cache/uv/sdists-v9/index/46901b1a4cb2cba0/pycairo/1.29.0/yfqQiA982PUk2EuihPGto/src/.mesonpy-ykyowt_t/meson-logs/meson-log.txt
hint: This usually indicates a problem with the package or the build
environment.
help: `pycairo` (v1.29.0) was included because `xhtml2pdf` (v0.2.17) depends
on `svglib` (v1.6.0) which depends on `rlpycairo` (v0.4.0) which
depends on `pycairo`
, retrying
很明显,报错原因是缺失依赖
# 进入正在运行的插件守护进程容器
docker exec -it docker-plugin_daemon-1 /bin/bash
进入容器后,先查看容器是什么系统
cat /etc/os-release
如果是 Ubuntu/Debian 系统,执行以下命令,如果是别的系统,让大模型给出对应系统的安装命令即可
apt update
apt install -y libcairo2-dev pkg-config python3-dev build-essential
再次安装插件发现问题解决

浙公网安备 33010602011771号