1. 程式人生 > >postfix找不到libmysqlclient.so.18

postfix找不到libmysqlclient.so.18

使用 emc gen exec ase ces open AI active

  最近需要下服務器上安裝gitlab,在使用yum安裝postfix之後,啟動post報錯,進行debug顯示如下錯誤提示

[root@localhost ~]# 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 五 2018
-03-02 09:43:51 CST; 27min ago Process: 11414 ExecStart=/usr/sbin/postfix start (code=exited, status=127) Process: 11411 ExecStartPre=/usr/libexec/postfix/chroot-update (code=exited, status=0/SUCCESS) Process: 11408 ExecStartPre=/usr/libexec/postfix/aliasesdb (code=exited, status=127) 3月 02 09:43:51 localhost.localdomain systemd[1
]: Starting Postfix Mail Transport Agent... 3月 02 09:43:51 localhost.localdomain aliasesdb[11408]: /usr/sbin/postconf: error while loading shared libraries: libmysqlclient.so.18: cannot op...rectory 3月 02 09:43:51 localhost.localdomain aliasesdb[11408]: /usr/bin/newaliases: error while loading shared libraries: libmysqlclient.so.18
: cannot o...rectory 3月 02 09:43:51 localhost.localdomain postfix[11414]: /usr/sbin/postfix: error while loading shared libraries: libmysqlclient.so.18: cannot open...irectory 3月 02 09:43:51 localhost.localdomain systemd[1]: postfix.service: control process exited, code=exited status=127 3月 02 09:43:51 localhost.localdomain systemd[1]: Failed to start Postfix Mail Transport Agent. 3月 02 09:43:51 localhost.localdomain systemd[1]: Unit postfix.service entered failed state. 3月 02 09:43:51 localhost.localdomain systemd[1]: postfix.service failed.

  錯誤顯示的是libmysqlclient.so.18沒有找到。

  在google解決方法之後,找到的解決方法

    在mysql的安裝路徑下找到libmysqlclient.so.18,再使用軟連接 到/usr/lib路徑下。

  在完成添加之後啟動還是會顯示上面的錯誤,最終把postfix卸載掉 重新yum 安裝才正常啟動

postfix找不到libmysqlclient.so.18