python - `pip install mysqlclient` 找不到 `mariadb` 因为它 's obsoleted by ` MariaDB-client`

标签 python pip centos mariadb

为了使用Galera集群仲裁器功能,我安装了MariaDB-xxx来自 YUM 仓库的 v10.5.8-1.el7.centos @mariadb .然而,后来 pip install mysqlclient未能提示丢失 mariadb .
mariadb实际上已被已安装的软件包 MariaDB-client 淘汰, 但它看起来像 pip install无法找到它。
任何提示将不胜感激。
部分截图:

(venv3.7) [root@host test]# pip install mysqlclient
...
  creating build/temp.linux-x86_64-3.7/MySQLdb
  gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -Dversion_info=(2,0,3,'final',0) -D__version__=2.0.3 -I/usr/include/mysql -I/usr/include/mysql/mysql -I/root/test/venv3.7/include -I/usr/local/include/python3.7m -c MySQLdb/_mysql.c -o build/temp.linux-x86_64-3.7/MySQLdb/_mysql.o -std=c99
  gcc -pthread -shared build/temp.linux-x86_64-3.7/MySQLdb/_mysql.o -L/usr/lib64/ -lmariadb -o build/lib.linux-x86_64-3.7/MySQLdb/_mysql.cpython-37m-x86_64-linux-gnu.so
  /usr/bin/ld: cannot find -lmariadb
  collect2: error: ld returned 1 exit status
  error: command 'gcc' failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for mysqlclient
  Running setup.py clean for mysqlclient
Failed to build mysqlclient
...
(venv3.7) [root@host test]# yum install mariadb
Loaded plugins: langpacks, product-id, search-disabled-repos, subscription-manager
Package 1:mariadb-5.5.68-1.el7.x86_64 is obsoleted by MariaDB-client-10.5.8-1.el7.centos.x86_64 which is already installed
Nothing to do
(venv3.7) [root@host test]#

最佳答案

我已经通过安装包 MariaDB-shared.x86_64 解决了这个问题.

关于python - `pip install mysqlclient` 找不到 `mariadb` 因为它 's obsoleted by ` MariaDB-client`,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66001740/

相关文章:

virtualenv - 蛋黄包列表中的 "has no metadata"是什么意思?

python - 为什么我在 Centos 上出现语法错误 python - pip

linux - Centos安装chrome失败

python - 使用 pip 安装一个包的多个版本

python - pyconfig.h 在 "pip install cryptography"期间丢失

centos - Yum 没有为 CentOS 7.7 提供最新的 FreeIPA (4.8.7)

python - Google App Engine 中的 RedirectRoute 和 url 参数

python - 使用 pymongo 将当前时间插入 mongo

python - 质因数,帮助理解平方根的用途

函数内的Python多处理: calling pool.映射