zhcn 技术 手机 非公開: 配置:错误:找不到 mysqlclient 库 – zabbix

配置:错误:找不到 mysqlclient 库 – zabbix

如果服务器上未安装所需的库和依赖项,开源设置总是很困难。

有时可能会令人沮丧。

几周前我在实施 Zabbix 时遇到了这个错误。

 checking for libperfstat 5.2.0.40 fileset...
no checking for libperfstat 5.3.0.60 fileset...
no checking for architecture...
linux (linux-gnu) checking for the linux kernel version... 2.6 family (2.6.32-358.el6.x86_64)
checking for mysql_config... no configure: error: MySQL library not found

您是否也遇到同样的错误?

我花了几个小时找到解决这个问题的方法,所以我想我会分享它。

我使用了以下配置命令:

 ./configure --with-mysql  --enable-server --enable-agent --enable-ipv6 --with-net-snmp --with-libcurl 
配置:错误:找不到 mysqlclient 库 - zabbix
配置:错误:找不到 mysqlclient 库 – zabbix

解决方案

  • 安装MySQL开发包
yum install mysql-devel

如果您使用的是 RHEL/CentOS 8,则可以使用 DNF。

 dnf install mysql-devel

如果您无法连接到互联网并下载上述内容,您可以手动下载并安装以下内容:

  https://www.rpmfind.net/linux/rpm2html/search.php?query=mysql-devel 
  http://rpm.pbone.net/index.php3/stat/3/srodzaj/1/search/mysql-shared 

上面的链接适用于 Linux(64 位)。您可能会看到另一个操作系统/架构的完整详细信息 – http://dev.mysql.com/downloads/mysql/#downloads

重新设置一下应该就没有问题了。

如果您有兴趣学习 Zabbix,请查看此Udemy 课程

配置:错误:找不到 mysqlclient 库 - zabbix
配置:错误:找不到 mysqlclient 库 – zabbix

“配置:错误:找不到mysqlclient库-zabbix”的通俗易懂的解释!您必须观看的最佳 2 个视频

Could not build wheels for mysqlclient, which is required to install pyproject.toml-based projects
https://www.youtube.com/watch?v=CNeVaTd_x0M&pp=ygVV5qeL5oiQOiDjgqjjg6njg7w6IG15c3FsY2 xpZW50IOODqeOCpOODluODqeODquOBjOimi-OBpOOBi-OCiuOBvuOBm-OCkyAtIHphYmJpeCZobD1KQQ%3D%3D
pip install mysqlclient not working – solved 💯 | How to install mysqlclient in Python -coder website
https://www.youtube.com/watch?v=cpTDhRL7wZo&pp=ygVV5qeL5oiQOiDjgqjjg6njg7w6IG15c3FsY2 xpZW50IOODqeOCpOODluODqeODquOBjOimi-OBpOOBi-OCiuOBvuOBm-OCkyAtIHphYmJpeCZobD1KQQ%3D%3D

如果服务器上未安装所需的库和依赖项,开源设置总是很困难。

有时可能会令人沮丧。

几周前我在实施 Zabbix 时遇到了这个错误。

 checking for libperfstat 5.2.0.40 fileset...
no checking for libperfstat 5.3.0.60 fileset...
no checking for architecture...
linux (linux-gnu) checking for the linux kernel version... 2.6 family (2.6.32-358.el6.x86_64)
checking for mysql_config... no configure: error: MySQL library not found

您是否也遇到同样的错误?

我花了几个小时找到解决这个问题的方法,所以我想我会分享它。

我使用了以下配置命令:

 ./configure --with-mysql  --enable-server --enable-agent --enable-ipv6 --with-net-snmp --with-libcurl 
配置:错误:找不到 mysqlclient 库 - zabbix
配置:错误:找不到 mysqlclient 库 – zabbix

解决方案

  • 安装MySQL开发包
yum install mysql-devel

如果您使用的是 RHEL/CentOS 8,则可以使用 DNF。

 dnf install mysql-devel

如果您无法连接到互联网并下载上述内容,您可以手动下载并安装以下内容:

  https://www.rpmfind.net/linux/rpm2html/search.php?query=mysql-devel 
  http://rpm.pbone.net/index.php3/stat/3/srodzaj/1/search/mysql-shared 

上面的链接适用于 Linux(64 位)。您可能会看到另一个操作系统/架构的完整详细信息 – http://dev.mysql.com/downloads/mysql/#downloads

重新设置一下应该就没有问题了。

如果您有兴趣学习 Zabbix,请查看此Udemy 课程

配置:错误:找不到 mysqlclient 库 - zabbix
配置:错误:找不到 mysqlclient 库 – zabbix

“配置:错误:找不到mysqlclient库-zabbix”的通俗易懂的解释!您必须观看的最佳 2 个视频

Could not build wheels for mysqlclient, which is required to install pyproject.toml-based projects
https://www.youtube.com/watch?v=CNeVaTd_x0M&pp=ygVV5qeL5oiQOiDjgqjjg6njg7w6IG15c3FsY2 xpZW50IOODqeOCpOODluODqeODquOBjOimi-OBpOOBi-OCiuOBvuOBm-OCkyAtIHphYmJpeCZobD1KQQ%3D%3D
pip install mysqlclient not working – solved 💯 | How to install mysqlclient in Python -coder website
https://www.youtube.com/watch?v=cpTDhRL7wZo&pp=ygVV5qeL5oiQOiDjgqjjg6njg7w6IG15c3FsY2 xpZW50IOODqeOCpOODluODqeODquOBjOimi-OBpOOBi-OCiuOBvuOBm-OCkyAtIHphYmJpeCZobD1KQQ%3D%3D