접미사: 공유 라이브러리 로드 중 오류 발생: libmysqlclient.so.16 [닫음]

접미사: 공유 라이브러리 로드 중 오류 발생: libmysqlclient.so.16 [닫음]

postfix: 공유 라이브러리 로드 오류: libmysqlclient.so.16: 공유 객체 파일을 열 수 없습니다: 해당 파일 또는 디렉터리가 없습니다.

[root@localhost ~]# mysql -uroot -p*** -e "select version();"
Warning: Using a password on the command line interface can be insecure.
+-----------+
| version() |
+-----------+
| 5.6.29    |
+-----------+

[root@localhost ~]# cat /etc/redhat-release 
CentOS release 6.7 (Final)

[root@localhost ~]# rpm -qa postfix
postfix-2.6.6-6.el6_7.1.x86_64

Zabbix 2.4.7을 설치한 후 zabbix로부터 이메일을 받을 수 없습니다. /var/log/maillog를 확인해보니 아래와 같이 많은 오류가 발견되었습니다.

Apr 30 00:53:44 localhost postfix/master[1283]: warning: process /usr/libexec/postfix/pickup pid 55061 exit status 127
Apr 30 00:53:44 localhost postfix/master[1283]: warning: /usr/libexec/postfix/pickup: bad command startup -- throttling
Apr 30 00:54:44 localhost postfix/master[1283]: warning: process /usr/libexec/postfix/pickup pid 55069 exit status 127
Apr 30 00:54:44 localhost postfix/master[1283]: warning: /usr/libexec/postfix/pickup: bad command startup -- throttling
Apr 30 00:55:44 localhost postfix/master[1283]: warning: process /usr/libexec/postfix/pickup pid 55158 exit status 127
Apr 30 00:55:44 localhost postfix/master[1283]: warning: /usr/libexec/postfix/pickup: bad command startup -- throttling
Apr 29 17:30:26 localhost postfix/postfix-script[55619]: fatal: cannot execute /usr/sbin/postconf!
Apr 29 17:41:40 localhost postfix/postfix-script[55662]: fatal: cannot execute /usr/sbin/postconf!
Apr 29 17:41:49 localhost postfix/postfix-script[55666]: fatal: cannot execute /usr/sbin/postconf!
Apr 29 18:17:01 localhost postfix[55724]: fatal: usage: postfix [-c config_dir] [-Dv] command
Apr 29 18:17:08 localhost postfix/postfix-script[55727]: fatal: cannot execute /usr/sbin/postconf!
Apr 29 18:17:20 localhost postfix/postfix-script[55730]: fatal: cannot execute /usr/sbin/postconf!
Apr 29 18:34:54 localhost postfix/postfix-script[55751]: fatal: cannot execute /usr/sbin/postconf!

그런 다음 postfix 상태를 확인했는데 postfix가 시작되지 않았습니다.

[root@localhost ~]# postfix status
postfix: error while loading shared libraries: libmysqlclient.so.16: cannot open shared object file: No such file or directory
[root@localhost ~]# postfix start
postfix: error while loading shared libraries: libmysqlclient.so.16: cannot open shared object file: No such file or directory

MySQL lib 디렉토리 목록

[root@localhost ~]# ls -la /usr/local/mysql/lib/
total 216100
drwxr-xr-x.  3 mysql mysql      4096 Apr 29 18:16 .
drwxr-xr-x. 13 mysql mysql      4096 Mar 29 18:09 ..
-rw-r--r--.  1 mysql mysql  11524834 Mar 29 01:35 libmysqlclient.a
lrwxrwxrwx.  1 mysql mysql        16 Mar 29 01:39 libmysqlclient_r.a -> libmysqlclient.a
lrwxrwxrwx.  1 mysql mysql        17 Mar 29 01:39 libmysqlclient_r.so -> libmysqlclient.so
lrwxrwxrwx.  1 mysql mysql        20 Mar 29 01:39 libmysqlclient_r.so.18 -> libmysqlclient.so.18
lrwxrwxrwx.  1 mysql mysql        24 Mar 29 01:39 libmysqlclient_r.so.18.1.0 -> libmysqlclient.so.18.1.0
lrwxrwxrwx.  1 mysql mysql        20 Mar 29 01:39 libmysqlclient.so -> libmysqlclient.so.18
lrwxrwxrwx.  1 mysql mysql        24 Mar 29 01:39 libmysqlclient.so.18 -> libmysqlclient.so.18.1.0
-rwxr-xr-x.  1 mysql mysql   5865820 Mar 29 01:35 libmysqlclient.so.18.1.0
-rw-r--r--.  1 mysql mysql 203859198 Mar 29 01:38 libmysqld.a
-rw-r--r--.  1 mysql mysql     14270 Mar 29 01:35 libmysqlservices.a
drwxr-xr-x.  3 mysql mysql      4096 Mar 29 01:39 plugin

또한 libmysqlclient.so.18을 libmysqlclient.so.16에 연결하려고 시도했지만 문제가 해결되지 않았습니다.

[root@localhost ~]# ln -s  /usr/local/mysql/lib/libmysqlclient.so /usr/lib64/libmysqlclient.so.16
[root@localhost ~]# 
[root@localhost ~]# 
[root@localhost ~]# postfix start
/usr/sbin/postconf: /usr/lib64/libmysqlclient.so.16: version `libmysqlclient_16' not found (required by /usr/sbin/postconf)
postfix/postfix-script: fatal: cannot execute /usr/sbin/postconf!
[root@localhost ~]# 
[root@localhost ~]# 
[root@localhost ~]# less /etc/ld.so.conf
include ld.so.conf.d/*.conf
/usr/local/lib/
/usr/local/mysql/lib

답변1

이전 버전의 mysql-libs가 포함된 패키지는 remi 저장소에서 사용할 수 있습니다.

먼저 저장소를 설치하십시오.

wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
rpm -Uvh remi-release-6.rpm

그런 다음 패키지를 설치할 수 있습니다.

yum install compat-mysql51.x86_64

관련 정보