完整教程:docker容器ubuntu:latest里使用uv add mysqlclient安装失败的解决方案

报错信息:

× Failed to build `mysqlclient==2.2.7`
├─▶ The build backend returned an error
╰─▶ Call to `setuptools.build_meta.build_wheel` failed (exit status: 1)
[stdout]
Trying pkg-config --exists mysqlclient
Command 'pkg-config --exists mysqlclient' returned non-zero exit status 127.
Trying pkg-config --exists mariadb
Command 'pkg-config --exists mariadb' returned non-zero exit status 127.
Trying pkg-config --exists libmariadb
Command 'pkg-config --exists libmariadb' returned non-zero exit status 127.
Trying pkg-config --exists perconaserverclient
Command 'pkg-config --exists perconaserverclient' returned non-zero exit status 127.
[stderr]
/bin/sh: 1: pkg-config: not found
posted @ 2025-08-19 12:27  yjbjingcha  阅读(27)  评论(0)    收藏  举报