查看报错日志
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 25msBuilding 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.iniThe Meson build systemVersion: 1.9.1Source dir:/root/.cache/uv/sdists-v9/index/46901b1a4cb2cba0/pycairo/1.29.0/yfqQiA982PUk2EuihPGto/srcBuild dir:/root/.cache/uv/sdists-v9/index/46901b1a4cb2cba0/pycairo/1.29.0/yfqQiA982PUk2EuihPGto/src/.mesonpy-ykyowt_tBuild type: native buildProject name: pycairoProject version: 1.29.0C compiler for the host machine: cc (gcc 13.3.0 "cc (Ubuntu13.3.0-6ubuntu2~24.04) 13.3.0")C linker for the host machine: cc ld.bfd 2.42Host machine cpu family: x86_64Host machine cpu: x86_64Program python3 found: YES(/root/.cache/uv/builds-v0/.tmpTyOatz/bin/python)Compiler for C supports arguments -Wall: YESCompiler for C supports arguments -Warray-bounds: YESCompiler for C supports arguments -Wcast-align: YESCompiler for C supports arguments -Wconversion: YESCompiler for C supports arguments -Wextra: YESCompiler for C supports arguments -Wformat=2: YESCompiler for C supports arguments -Wformat-nonliteral: YESCompiler for C supports arguments -Wformat-security: YESCompiler for C supports arguments -Wimplicit-function-declaration: YESCompiler for C supports arguments -Winit-self: YESCompiler for C supports arguments -Wmissing-format-attribute: YESCompiler for C supports arguments -Wmissing-noreturn: YESCompiler for C supports arguments -Wnested-externs: YESCompiler for C supports arguments -Wold-style-definition: YESCompiler for C supports arguments -Wpacked: YESCompiler for C supports arguments -Wpointer-arith: YESCompiler for C supports arguments -Wreturn-type: YESCompiler for C supports arguments -Wshadow: YESCompiler for C supports arguments -Wsign-compare: YESCompiler for C supports arguments -Wstrict-aliasing: YESCompiler for C supports arguments -Wundef: YESCompiler for C supports arguments -Wunused-but-set-variable: YESCompiler for C supports arguments -Wswitch-default: YESCompiler for C supports arguments -Wno-missing-field-initializers: YESCompiler for C supports arguments -Wno-unused-parameter: YESCompiler for C supports arguments -fno-strict-aliasing: YESCompiler for C supports arguments -fvisibility=hidden: YESDid not find pkg-config by name 'pkg-config'Found pkg-config: NODid not find CMake 'cmake'Found CMake: NORun-time dependency cairo found: NO../cairo/meson.build:31:12: ERROR: Dependency lookup for cairo withmethod 'pkgconfig' failed: Pkg-config for machine host machine notfound. 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.txthint: This usually indicates a problem with the package or the buildenvironment.help: `pycairo` (v1.29.0) was included because `xhtml2pdf` (v0.2.17) dependson `svglib` (v1.6.0) which depends on `rlpycairo` (v0.4.0) whichdepends 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
再次安装插件发现问题解决