如果服务器上未安装所需的库和依赖项,开源设置总是很困难。
有时可能会令人沮丧。
几周前我在实施 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 
解决方案
- 安装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 课程。




![2021 年如何设置 Raspberry Pi Web 服务器 [指南]](https://i0.wp.com/pcmanabu.com/wp-content/uploads/2019/10/web-server-02-309x198.png?w=1200&resize=1200,0&ssl=1)

