编译装个zabbix6.0.23报错了MySQL library not found

编译安装zabbix-6.0.23
./configure --enable-server --enable-agent --with-mysql --enable-ipv6 --with-net-snmp --with-libcurl --with-libxml2 --with-openipmi

报错:MySQL library not found
[root@ ]# cat /etc/openEuler-release
openEuler release 22.03 (LTS-SP2)

[root@ ]# mysql --version
mysql Ver 8.0.35 for Linux on x86_64 (MySQL Community Server - GPL)

[root@ ]# mysql_conf
-bash: mysql_conf: command not found

[root@ ]# find / -name libmysqlclient*
/usr/lib64/mysql/libmysqlclient.so.21
/usr/lib64/mysql/libmysqlclient.so.21.2.35

安装包mysql-community-8.0.35-1.x86_64.tar
只安装这几个包:
[root@ ]# ls -lrt mysql*
-rw-r–r-- 1 root root 2314293 Oct 26 13:13 mysql-community-icu-data-files-8.0.35-1.x86_64.rpm
-rw-r–r-- 1 root root 650537 Oct 26 13:13 mysql-community-common-8.0.35-1.x86_64.rpm
-rw-r–r-- 1 root root 4821517 Oct 26 13:13 mysql-community-libs-8.0.35-1.x86_64.rpm
-rw-r–r-- 1 root root 7806653 Oct 26 13:13 mysql-community-client-plugins-8.0.35-1.x86_64.rpm
-rw-r–r-- 1 root root 57676613 Oct 26 13:13 mysql-community-client-8.0.35-1.x86_64.rpm
-rw-r–r-- 1 root root 522504241 Oct 26 13:18 mysql-community-server-8.0.35-1.x86_64.rpm

按照网络上好多都是找安装mysql-devel,找了centos7、8、9的都没有合适的。请大神帮忙看一下。谢谢。

看着是缺mysql的包。其实mysql在openeuler的源里都有,yum list | grep mysql 你用这个命令找下mysql-dev

centos的包最好不要在openeuler上安装。rpm包可以到repo.openeuler.ogr里找

谢谢,以前配置的是这个源
https://mirrors.huaweicloud.com/openeuler/openEuler-22.03-LTS-SP2/OS/x86_64/
当前配置这个源地址就可以找到mysql-dev的包
https://mirrors.huaweicloud.com/openeuler/openEuler-22.03-LTS-SP2/everything/x86_64/Packages/
找到这个包后,因为安装的是msql8.0.35,源地址的mysql-dev版本是8.0.29
安装还是出错,
[root@OraAdg yum.repos.d]# dnf install mysql-devel
Last metadata expiration check: 0:00:15 ago on Thu 16 Nov 2023 02:41:47 PM CST.
Error:
Problem: package mysql-devel-8.0.29-3.oe2203sp2.x86_64 requires mysql-libs(x86-64) = 8.0.29-3.oe2203sp2, but none of the providers can be installed

  • installed package mysql-community-libs-8.0.35-1.x86_64 obsoletes mysql-libs < 8.0.35-1 provided by mysql-libs-8.0.29-3.oe2203sp2.x86_64
  • conflicting requests
  • problem with installed package mysql-community-libs-8.0.35-1.x86_64
    (try to add ‘–skip-broken’ to skip uninstallable packages or ‘–nobest’ to use not only best candidate packages)

目前卸载8.0.35,安装源的8.0.29试试。。。。

已经处理好了。因为从mysql官方下载的8.0.35,没有单独的mysql-dev包。
从openEuler的evering里面有mysql-dev包,安装会和8.0.35有冲突,所以只能安装openEuler的源镜像地址的mysql-8.0.29(这个版本mysql官方当前不支持了,找不到安装包)。

没试过保留官方8.0.29以上的mysql版本安装mysql-dev包。

2 Likes

建议还是二进制部署mysql ,rpm包可能不适配openeuler

嗯,而且有漏洞风险