postfix를 시작하려고 하면 다음 오류가 발생합니다.
/usr/sbin/postconf: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such...r directory
/usr/bin/newaliases: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No suc...r directory
/usr/sbin/postfix: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No suc...r directory
Postfix는 mysql을 설치하기 전까지는 잘 작동했습니다. mysql에 Postfix 오류가 발생하는 이유가 무엇인지 잘 모르겠습니다.
find . -name 'libmysqlclient*'
명령을 실행하면 다음과 같은 결과가 나타납니다.
./usr/lib64/mysql/libmysqlclient.so.21
./usr/lib64/mysql/libmysqlclient.so.21.2.30
# ls -al /usr/lib64/mysql
total 7520
drwxr-xr-x. 5 root root 109 Sep 29 13:47 .
dr-xr-xr-x. 49 root root 28672 Sep 29 13:49 ..
lrwxrwxrwx. 1 root root 25 Sep 28 21:53 libmysqlclient.so.21 -> libmysqlclient.so.21.2.30
-rwxr-xr-x. 1 root root 7651120 Jul 6 17:53 libmysqlclient.so.21.2.30
drwxr-xr-x. 4 root root 28 Sep 28 21:53 mecab
drwxr-xr-x. 2 root root 4096 Sep 28 21:53 plugin
drwxr-xr-x. 3 root root 131 Sep 28 21:53 private
18 버전이 설치되어 있지 않은데 왜 21이 아닌 18을 찾는지 혼란스럽습니다.
나에게 도움이 된 추가 정보:
mysql-community-server-8.0.30-1.el7.x86_64
#which mysql: /bin/mysql/mysql
#mysql -V: Ver 8.0.30 for Linux on x86_64 (MySQL Community Server - GPL)
#mysqld -V: /usr/sbin/mysqld Ver 8.0.30 for Linux on x86_64 (MySQL Community Server - GPL)
#php -v PHP 8.0.20 (cli)
#systemctl status mysqld: Active: active (running) since Fri 2022-09-30 23:27:02 CDT; 3 days ago
# rpm -qa postfix: postfix-2.10.1-6.amzn2.0.3.x86_64
AWS Linux 2 Server
누구든지 도와줄 수 있나요? 내 문제와 유사한 다른 게시물을 여기에서 확인했지만 시도할 수 있을 만큼 내 상황에 근접한 해결책을 찾을 수 없었습니다.
마지막으로 이 명령도 실행했는데 많은 정보가 출력되었으므로 이 게시물 끝에 저장했습니다.
# repoquery --whatprovides *libmysqlclient*
mysql-community-libs-0:8.0.18-1.el7.i686
mysql-community-libs-0:8.0.11-1.el7.i686
mysql-community-devel-0:8.0.11-1.el7.i686
mysql-community-libs-0:8.0.27-1.el7.i686
mysql-community-libs-compat-0:8.0.15-1.el7.i686
mysql-community-libs-0:8.0.27-1.el7.x86_64
mysql-community-devel-0:8.0.17-1.el7.i686
mysql-workbench-community-0:6.3.5-1.el7.x86_64
mysql-community-libs-0:8.0.30-1.el7.i686
mysql-community-devel-0:8.0.15-1.el7.x86_64
mysql-community-libs-compat-0:8.0.24-1.el7.i686
mysql-community-libs-compat-0:8.0.26-1.el7.i686
mysql-workbench-community-0:8.0.16-1.el7.x86_64
mysql-community-libs-0:8.0.26-1.el7.i686
mysql-community-libs-0:8.0.17-1.el7.i686
mysql-workbench-community-0:8.0.12-1.el7.x86_64
mysql-community-devel-0:8.0.21-1.el7.i686
mysql-community-libs-compat-0:8.0.13-1.el7.i686
mysql-community-libs-compat-0:8.0.16-2.el7.i686
mariadb-devel-1:5.5.60-1.amzn2.x86_64
mysql-community-devel-0:8.0.16-2.el7.i686
mysql-community-devel-0:8.0.19-1.el7.x86_64
mysql-community-devel-0:8.0.18-1.el7.x86_64
mysql-community-libs-0:8.0.16-2.el7.i686
mysql-community-libs-compat-0:8.0.22-1.el7.i686
mariadb-devel-1:5.5.56-2.amzn2.0.2.x86_64
mysql-community-libs-0:8.0.16-2.el7.x86_64
mysql-community-devel-0:8.0.26-1.el7.i686
mysql-community-libs-0:8.0.22-1.el7.x86_64
mysql-community-libs-0:8.0.28-1.el7.x86_64
mysql-community-libs-0:8.0.23-1.el7.x86_64
mysql-community-devel-0:8.0.30-1.el7.i686
mysql-community-devel-0:8.0.26-1.el7.x86_64
mysql-community-libs-compat-0:8.0.19-1.el7.i686
mysql-community-devel-0:8.0.11-1.el7.x86_64
mysql-community-libs-0:8.0.13-1.el7.i686
mysql-community-libs-compat-0:8.0.12-1.el7.i686
mariadb-devel-1:5.5.62-1.amzn2.0.1.x86_64
mysql-workbench-community-0:8.0.22-1.el7.x86_64
mysql-community-devel-0:8.0.15-1.el7.i686
mysql-community-devel-0:8.0.12-1.el7.x86_64
mysql-community-devel-0:8.0.12-1.el7.i686
mysql-workbench-community-0:6.2.4-1.el7.x86_64
mysql-community-devel-0:8.0.23-1.el7.i686
mariadb-libs-1:5.5.62-1.amzn2.0.1.i686
mysql-community-devel-0:8.0.16-1.el7.i686
mysql-community-libs-compat-0:8.0.25-1.el7.x86_64
mysql-community-libs-compat-0:8.0.21-1.el7.i686
mysql-community-libs-0:8.0.21-1.el7.x86_64
mysql-workbench-community-0:8.0.13-1.el7.x86_64
mysql-community-libs-compat-0:8.0.14-1.el7.x86_64
mysql-community-libs-compat-0:8.0.27-1.el7.x86_64
mysql-community-libs-compat-0:8.0.30-1.el7.i686
mysql-community-libs-compat-0:8.0.23-1.el7.i686
mysql-community-devel-0:8.0.14-1.el7.x86_64
mariadb-devel-1:5.5.56-2.amzn2.x86_64
mysql-community-libs-0:8.0.17-1.el7.x86_64
mysql-community-devel-0:8.0.22-1.el7.i686
mysql-community-libs-0:8.0.20-1.el7.i686
mariadb-libs-1:5.5.68-1.amzn2.i686
mysql-community-libs-0:8.0.25-1.el7.i686
mariadb-libs-1:5.5.56-2.amzn2.x86_64
mysql-community-libs-0:8.0.16-1.el7.i686
mysql-community-libs-compat-0:8.0.14-1.el7.i686
mariadb-libs-1:5.5.68-1.amzn2.x86_64
mysql-community-libs-compat-0:8.0.19-1.el7.x86_64
mysql-community-libs-0:8.0.12-1.el7.i686
mysql-workbench-community-0:6.3.6-1.el7.x86_64
mysql-workbench-community-0:6.3.7-1.el7.x86_64
mysql-community-libs-0:8.0.11-1.el7.x86_64
mysql-community-libs-compat-0:8.0.25-1.el7.i686
mysql-community-libs-0:8.0.20-1.el7.x86_64
mariadb-libs-1:5.5.60-1.amzn2.i686
mysql-community-libs-compat-0:8.0.30-1.el7.x86_64
mysql-community-libs-compat-0:8.0.11-1.el7.i686
mysql-community-libs-0:8.0.25-1.el7.x86_64
mariadb-devel-1:5.5.68-1.amzn2.x86_64
mysql-community-devel-0:8.0.22-1.el7.x86_64
mariadb-libs-1:5.5.56-2.amzn2.0.2.i686
mysql-community-libs-compat-0:8.0.21-1.el7.x86_64
mysql-community-libs-compat-0:8.0.18-1.el7.x86_64
mysql-community-devel-0:8.0.28-1.el7.i686
mariadb-libs-1:5.5.62-1.amzn2.0.1.x86_64
mysql-community-libs-compat-0:8.0.24-1.el7.x86_64
mysql-community-devel-0:8.0.28-1.el7.x86_64
mysql-community-libs-compat-0:8.0.18-1.el7.i686
mysql-community-libs-0:8.0.19-1.el7.i686
mysql-community-libs-0:8.0.15-1.el7.x86_64
mysql-community-devel-0:8.0.19-1.el7.i686
mysql-community-libs-0:8.0.28-1.el7.i686
mariadb-libs-1:5.5.64-1.amzn2.x86_64
mysql-workbench-community-0:6.2.5-1.el7.x86_64
mysql-community-libs-compat-0:8.0.16-1.el7.x86_64
mysql-community-libs-compat-0:8.0.28-1.el7.x86_64
mariadb-libs-1:5.5.60-1.amzn2.x86_64
mysql-workbench-community-0:8.0.14-1.el7.x86_64
mysql-workbench-community-0:8.0.15-1.el7.x86_64
mysql-community-libs-0:8.0.21-1.el7.i686
mysql-community-devel-0:8.0.23-1.el7.x86_64
mysql-community-libs-compat-0:8.0.11-1.el7.x86_64
mysql-workbench-community-0:6.3.4-1.el7.x86_64
mysql-workbench-community-0:6.2.3-1.el7.x86_64
mariadb-devel-1:5.5.64-1.amzn2.x86_64
mysql-community-devel-0:8.0.24-1.el7.x86_64
mysql-community-libs-0:8.0.23-1.el7.i686
mysql-workbench-community-0:6.3.3-1.el7.x86_64
mysql-community-devel-0:8.0.25-1.el7.i686
mysql-workbench-community-0:8.0.18-1.el7.x86_64
mysql-community-devel-0:8.0.20-1.el7.i686
mariadb-libs-1:5.5.64-1.amzn2.i686
mysql-community-libs-compat-0:8.0.23-1.el7.x86_64
mysql-community-devel-0:8.0.16-2.el7.x86_64
mysql-community-libs-0:8.0.14-1.el7.i686
mysql-community-libs-0:8.0.19-1.el7.x86_64
mysql-community-libs-compat-0:8.0.12-1.el7.x86_64
mysql-community-libs-compat-0:8.0.13-1.el7.x86_64
mysql-community-devel-0:8.0.17-1.el7.x86_64
mysql-community-devel-0:8.0.27-1.el7.x86_64
mysql-workbench-community-0:8.0.21-1.el7.x86_64
mysql-community-libs-0:8.0.22-1.el7.i686
mysql-community-devel-0:8.0.13-1.el7.x86_64
mysql-community-libs-compat-0:8.0.26-1.el7.x86_64
mysql-workbench-community-0:6.3.6-2.el7.x86_64
mysql-workbench-community-0:6.3.8-1.el7.x86_64
mysql-community-libs-0:8.0.24-1.el7.x86_64
mysql-community-libs-compat-0:8.0.16-1.el7.i686
mysql-community-libs-compat-0:8.0.17-1.el7.i686
mysql-community-libs-compat-0:8.0.22-1.el7.x86_64
mysql-community-libs-0:8.0.30-1.el7.x86_64
mysql-community-libs-compat-0:8.0.28-1.el7.i686
mysql-community-devel-0:8.0.27-1.el7.i686
mysql-community-libs-compat-0:8.0.15-1.el7.x86_64
mysql-community-devel-0:8.0.25-1.el7.x86_64
mysql-community-devel-0:8.0.18-1.el7.i686
mysql-community-libs-0:8.0.18-1.el7.x86_64
mysql-community-devel-0:8.0.16-1.el7.x86_64
mysql-community-libs-0:8.0.26-1.el7.x86_64
mysql-workbench-community-0:8.0.20-1.el7.x86_64
mysql-community-libs-0:8.0.12-1.el7.x86_64
mysql-community-libs-0:8.0.15-1.el7.i686
mysql-workbench-community-0:8.0.19-1.el7.x86_64
mysql-community-devel-0:8.0.30-1.el7.x86_64
mysql-community-libs-compat-0:8.0.17-1.el7.x86_64
mysql-community-libs-compat-0:8.0.20-1.el7.i686
mysql-community-libs-0:8.0.14-1.el7.x86_64
mysql-community-libs-compat-0:8.0.20-1.el7.x86_64
mysql-community-libs-0:8.0.24-1.el7.i686
mysql-community-devel-0:8.0.14-1.el7.i686
mysql-community-devel-0:8.0.13-1.el7.i686
mysql-community-libs-compat-0:8.0.16-2.el7.x86_64
mysql-community-devel-0:8.0.24-1.el7.i686
mysql-community-libs-compat-0:8.0.27-1.el7.i686
mysql-community-libs-0:8.0.13-1.el7.x86_64
mariadb-libs-1:5.5.56-2.amzn2.0.2.x86_64
mysql-workbench-community-0:8.0.17-1.el7.x86_64
mysql-community-devel-0:8.0.20-1.el7.x86_64
mysql-community-devel-0:8.0.21-1.el7.x86_64
mysql-community-libs-0:8.0.16-1.el7.x86_64
답변1
업데이트 및 수정:
이 특정 문제를 파악하려고 몇 시간 동안 노력한 끝에 마침내 postfix를 제거하고 다시 설치하기로 결정했습니다. 좋은 소식은 이 기능이 작동하고 잃어버린 패키지를 찾는 데 도움이 된다는 것입니다.
내가 실행한 명령은 다음과 같습니다.
#yum remove postifix
#yum clean all
#yum install postfix
이제 설치 결과는 다음과 같습니다.
# yum install postfix
Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
amzn2-core | 3.7 kB 00:00:00
amzn2extra-docker | 3.0 kB 00:00:00
amzn2extra-epel | 3.0 kB 00:00:00
amzn2extra-kernel-5.10 | 3.0 kB 00:00:00
amzn2extra-nginx1 | 3.0 kB 00:00:00
amzn2extra-php8.0 | 3.0 kB 00:00:00
epel/x86_64/metalink | 22 kB 00:00:00
epel | 4.7 kB 00:00:00
mysql-connectors-community | 2.6 kB 00:00:00
mysql-tools-community | 2.6 kB 00:00:00
mysql80-community | 2.6 kB 00:00:00
(1/19): amzn2-core/2/x86_64/group_gz | 2.5 kB 00:00:00
(2/19): amzn2-core/2/x86_64/updateinfo | 498 kB 00:00:00
(3/19): amzn2extra-epel/2/x86_64/primary_db | 1.8 kB 00:00:00
(4/19): amzn2extra-kernel-5.10/2/x86_64/updateinfo | 18 kB 00:00:00
(5/19): amzn2extra-docker/2/x86_64/updateinfo | 6.4 kB 00:00:00
(6/19): amzn2extra-epel/2/x86_64/updateinfo | 76 B 00:00:00
(7/19): amzn2extra-nginx1/2/x86_64/updateinfo | 76 B 00:00:00
(8/19): amzn2extra-docker/2/x86_64/primary_db | 93 kB 00:00:00
(9/19): amzn2extra-nginx1/2/x86_64/primary_db | 48 kB 00:00:00
(10/19): amzn2extra-php8.0/2/x86_64/updateinfo | 76 B 00:00:00
(11/19): amzn2extra-php8.0/2/x86_64/primary_db | 181 kB 00:00:00
(12/19): epel/x86_64/group_gz | 97 kB 00:00:00
(13/19): epel/x86_64/updateinfo | 1.1 MB 00:00:00
(14/19): amzn2extra-kernel-5.10/2/x86_64/primary_db | 11 MB 00:00:00
(15/19): epel/x86_64/primary_db | 7.0 MB 00:00:00
(16/19): mysql-connectors-community/x86_64/primary_db | 90 kB 00:00:00
(17/19): mysql-tools-community/x86_64/primary_db | 87 kB 00:00:00
(18/19): mysql80-community/x86_64/primary_db | 211 kB 00:00:00
(19/19): amzn2-core/2/x86_64/primary_db | 65 MB 00:00:01
293 packages excluded due to repository priority protections
Resolving Dependencies
--> Running transaction check
---> Package postfix.x86_64 2:2.10.1-6.amzn2.0.3 will be installed
--> Processing Dependency: libmysqlclient.so.18(libmysqlclient_18)(64bit) for package: 2:postfix-2.10.1-6.amzn2.0.3.x86_64
--> Processing Dependency: libmysqlclient.so.18()(64bit) for package: 2:postfix-2.10.1-6.amzn2.0.3.x86_64
--> Running transaction check
---> Package mysql-community-libs-compat.x86_64 0:8.0.30-1.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
======================================================================================================================================================================================================
Package Arch Version Repository Size
======================================================================================================================================================================================================
Installing:
postfix x86_64 2:2.10.1-6.amzn2.0.3 amzn2-core 2.4 M
Installing for dependencies:
mysql-community-libs-compat x86_64 8.0.30-1.el7 mysql80-community 670 k
Transaction Summary
======================================================================================================================================================================================================
Install 1 Package (+1 Dependent package)
여기에서 볼 수 있듯이 제 경우에는 누락된 패키지가 입니다 mysql-community-libs-compat-8.0.30-1.el7.x86_64
.
이제 다음 메시지가 나타납니다.
# ls -al /usr/lib64/mysql
total 10984
drwxr-xr-x. 5 root root 233 Oct 4 12:41 .
dr-xr-xr-x. 49 root root 28672 Sep 29 13:49 ..
lrwxrwxrwx. 1 root root 20 Oct 4 12:41 libmysqlclient_r.so.18 -> libmysqlclient.so.18
lrwxrwxrwx. 1 root root 24 Oct 4 12:41 libmysqlclient_r.so.18.1.0 -> libmysqlclient.so.18.1.0
lrwxrwxrwx. 1 root root 24 Oct 4 12:41 libmysqlclient.so.18 -> libmysqlclient.so.18.1.0
-rwxr-xr-x. 1 root root 3546456 Jul 6 17:53 libmysqlclient.so.18.1.0
lrwxrwxrwx. 1 root root 25 Sep 28 21:53 libmysqlclient.so.21 -> libmysqlclient.so.21.2.30
-rwxr-xr-x. 1 root root 7651120 Jul 6 17:53 libmysqlclient.so.21.2.30
drwxr-xr-x. 4 root root 28 Sep 28 21:53 mecab
drwxr-xr-x. 2 root root 4096 Sep 28 21:53 plugin
drwxr-xr-x. 3 root root 131 Sep 28 21:53 private
마지막으로 다음 명령을 실행했습니다.
//Start Postfix
#systemctl start postfix
//Enable the service so it will start on its own after reboot
#systemctl enable postfix
//Check to ensure it is running with no errors
#systemctl status postfix
//The key portion of the output that I was looking for
Active: active (running)
마지막으로, 제대로 작동하는지 테스트해 보세요.물론 이것은 내 필요에 맞게 Postfix를 구성한 후입니다!
echo "Subject: My Test Email #1" | /usr/sbin/sendmail [email protected]
이메일을 받았습니다! :)
비슷한 상황에 있는 다른 사람들에게도 도움이 되기를 바랍니다!