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]
メールが届きました! :)
同様の状況で他の人にも役立つことを願っています!