apt-getを使用してUbuntu MySQLをインストールできない

apt-getを使用してUbuntu MySQLをインストールできない

私は以前MariaDBをインストールしましたが、私のサーバーにMySQL 5.7をインストールしようとしています。 mariadbとmysqlを使用してすべてのファイルを消去しました。 MySQL-Server-5.7をインストールすると、次のエラーが発生しました。 (検索時にエラーが発生する理由は、以前にマリアをインストールしたためだと思います。) また、ログから、mysql-commonがマリアの一形態であることがわかります。これが意図的なのか正しいのかはわかりません。 (Ubuntu 18.04)

Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
  mysql-client-5.7 mysql-client-core-5.7 mysql-common mysql-server-core-5.7
Suggested packages:
  mailx tinyca
The following NEW packages will be installed:
  mysql-client-5.7 mysql-client-core-5.7 mysql-common mysql-server-5.7 mysql-server-core-5.7
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/19.0 MB of archives.
After this operation, 154 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Preconfiguring packages ...
Selecting previously unselected package mysql-common.
(Reading database ... 93055 files and directories currently installed.)
Preparing to unpack .../mysql-common_1%3a10.4.12+maria~bionic_all.deb ...
Unpacking mysql-common (1:10.4.12+maria~bionic) ...
Selecting previously unselected package mysql-client-core-5.7.
Preparing to unpack .../mysql-client-core-5.7_5.7.29-0ubuntu0.18.04.1_amd64.deb ...
Unpacking mysql-client-core-5.7 (5.7.29-0ubuntu0.18.04.1) ...
Selecting previously unselected package mysql-client-5.7.
Preparing to unpack .../mysql-client-5.7_5.7.29-0ubuntu0.18.04.1_amd64.deb ...
Unpacking mysql-client-5.7 (5.7.29-0ubuntu0.18.04.1) ...
Selecting previously unselected package mysql-server-core-5.7.
Preparing to unpack .../mysql-server-core-5.7_5.7.29-0ubuntu0.18.04.1_amd64.deb ...
Unpacking mysql-server-core-5.7 (5.7.29-0ubuntu0.18.04.1) ...
Setting up mysql-common (1:10.4.12+maria~bionic) ...
Selecting previously unselected package mysql-server-5.7.
(Reading database ... 93203 files and directories currently installed.)
Preparing to unpack .../mysql-server-5.7_5.7.29-0ubuntu0.18.04.1_amd64.deb ...
Unpacking mysql-server-5.7 (5.7.29-0ubuntu0.18.04.1) ...
Setting up mysql-server-core-5.7 (5.7.29-0ubuntu0.18.04.1) ...
Setting up mysql-client-core-5.7 (5.7.29-0ubuntu0.18.04.1) ...
Setting up mysql-client-5.7 (5.7.29-0ubuntu0.18.04.1) ...
Setting up mysql-server-5.7 (5.7.29-0ubuntu0.18.04.1) ...
/var/lib/dpkg/info/mysql-server-5.7.postinst: line 191: /usr/share/mysql-common/configure-symlinks: No such file or directory
dpkg: error processing package mysql-server-5.7 (--configure):
 installed mysql-server-5.7 package post-installation script subprocess returned error exit status 127
Processing triggers for systemd (237-3ubuntu10.38) ...
Processing triggers for man-db (2.8.3-2ubuntu0.1) ...
Processing triggers for ureadahead (0.100.0-21) ...
Errors were encountered while processing:
 mysql-server-5.7
E: Sub-process /usr/bin/dpkg returned an error code (1)```

ベストアンサー1

ログで見つかった場合

Preparing to unpack .../mysql-common_1%3a10.4.12+maria~bionic_all.deb ...
Unpacking mysql-common (1:10.4.12+maria~bionic) ...

/etc/apt/sources.list.d/mariadb.listMariaはまだ使用中です。ここにMaria Repoがある場合は削除する必要があります。/etc/apt/sources.list.d

おすすめ記事