postfix启动: relocation error: /usr/sbin/postconf: symbol mysql_real_connect, version libmysqlclient_18 not defined in file libmysqlclient...time reference
原创 sorryboy 发表于:2020-03-29 14:37:39
  阅读 :1313   收藏   编辑
[root@ssf install]# systemctl  status postfix.service
● postfix.service - Postfix Mail Transport Agent
   Loaded: loaded (/usr/lib/systemd/system/postfix.service; enabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Sat 2020-03-28 17:37:59 CST; 14s ago
  Process: 114860 ExecStart=/usr/sbin/postfix start (code=exited, status=1/FAILURE)
  Process: 114857 ExecStartPre=/usr/libexec/postfix/chroot-update (code=exited, status=0/SUCCESS)
  Process: 114853 ExecStartPre=/usr/libexec/postfix/aliasesdb (code=exited, status=127)

Mar 28 17:37:59 ssf systemd[1]: Starting Postfix Mail Transport Agent...
Mar 28 17:37:59 ssf aliasesdb[114853]: /usr/sbin/postconf: relocation error: /usr/sbin/postconf: symbol mysql_real_connect, version libmysqlclient_18 not defined in file libmysqlclien...ime reference
Mar 28 17:37:59 ssf aliasesdb[114853]: postalias: relocation error: postalias: symbol mysql_real_connect, version libmysqlclient_18 not defined in file libmysqlclient.so.18 with link time reference
Mar 28 17:37:59 ssf postfix[114860]: /usr/sbin/postconf: relocation error: /usr/sbin/postconf: symbol mysql_real_connect, version libmysqlclient_18 not defined in file libmysqlclient...time reference
Mar 28 17:37:59 ssf postfix/postfix-script[114863]: fatal: cannot execute /usr/sbin/postconf!
Mar 28 17:37:59 ssf systemd[1]: postfix.service: control process exited, code=exited status=1
Mar 28 17:37:59 ssf systemd[1]: Failed to start Postfix Mail Transport Agent.
Mar 28 17:37:59 ssf systemd[1]: Unit postfix.service entered failed state.
Mar 28 17:37:59 ssf systemd[1]: postfix.service failed.
Hint: Some lines were ellipsized, use -l to show in full.

原因:centos7安装的为mysql8,是没有libmysqlclient.so.18文件,取而代之的是libmysqlclient.so.20

解决:下载mysql-community-libs-compat-5.7.29-1.el7.x86_64.rpm安装即可

下载地址:https://dev.mysql.com/downloads/mysql/

1.png

2.png

找到该rpm文件

3.png

rpm -ivh mysql-community-libs-compat-5.7.29-1.el7.x86_64.rpm