apt-get을 사용하여 Ubuntu MySQL을 설치하지 못함

apt-get을 사용하여 Ubuntu MySQL을 설치하지 못함

이전에 MariaDB를 설치했는데 이제 내 서버에 MySQL 5.7을 설치하려고 합니다. mariadb와 mysql을 사용하여 모든 파일을 지웠습니다. MySQL-Server-5.7을 설치할 때 다음 오류가 발생했습니다. (검색시 오류가 발생하는 이유는 이전에 마리아를 설치했기 때문인 것 같습니다.) 또한 로그에서 mysql-common이 maria의 한 형태임을 알 수 있습니다. 이것이 의도적인 것인지 올바른 것인지는 모르겠습니다. (우분투 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

관련 정보