MySQL 8 설치 실패 - dpkg: 종속성 문제로 인해 mysql-server 구성이 방해됨:

MySQL 8 설치 실패 - dpkg: 종속성 문제로 인해 mysql-server 구성이 방해됨:

아직 Ubuntu에 MySQL 8을 설치할 수 없었습니다.

  • 배포판: Ubuntu 18.04.2 LTS(WSL을 사용하여 Windows에서 실행)
  • WSL 버전: 4.4.0-17134-Microsoft
  • MySQL 서버 : 8.0.16-2ubuntu18.04 amd64

나는 다음 지침을 따르고 있습니다 -MySQL을 새로 설치하는 단계

다운로드된 Deb 패키지: (mysql-apt-config_0.8.13-1_all.deb)

비슷한 사례를 바탕으로 인터넷에서 찾은 몇 가지 제안을 시도했지만 아무 것도 효과가 없었습니다. 예 : sudo apt -f install-> 종속성 문제를 해결하기 위해.

설치 후 mysql 서버를 시작하는 명령을 실행했는데 서비스가 인식되지 않아 설치가 실패합니다.

내 경험에 따르면 문제의 근본 원인을 정확하게 평가하는 것은 매우 어렵습니다. 어떤 제안이나 제안이라도 정말 감사하겠습니다.

이 설치 프로세스를 따를 계획입니다. My SQL Community Server,https://dev.mysql.com/downloads/mysql/, 설치할 패키지를 선택할 수 있습니다.


설치 프로세스가 완료된 후 설치된 MySql 패키지

dpkg -l | grep mysql -> Installed Packages

ii  mysql-apt-config               0.8.13-1                           all          Auto configuration for MySQL APT Repo.
ii  mysql-client                   8.0.16-2ubuntu18.04                amd64        MySQL Client meta package depending on latest version
ii  mysql-common                   8.0.16-2ubuntu18.04                amd64        Common files shared between packages
ii  mysql-community-client         8.0.16-2ubuntu18.04                amd64        MySQL Client
ii  mysql-community-client-core    8.0.16-2ubuntu18.04                amd64        MySQL Client Core Binaries
iF  mysql-community-server         8.0.16-2ubuntu18.04                amd64        MySQL Server
ii  mysql-community-server-core    8.0.16-2ubuntu18.04                amd64        MySQL Server Core Binaires
iU  mysql-server                   8.0.16-2ubuntu18.04                amd64        MySQL Server meta package depending on latest version

설치 출력 :

update-alternatives: using /var/lib/mecab/dic/ipadic to provide /var/lib/mecab/dic/debian (mecab-dictionary) in auto mode
Setting up mysql-client (8.0.16-2ubuntu18.04) ...
Setting up mysql-community-server-core (8.0.16-2ubuntu18.04) ...
Setting up mecab-ipadic-utf8 (2.7.0-20070801+main-1) ...
Compiling IPA dictionary for Mecab.  This takes long time...
reading /usr/share/mecab/dic/ipadic/unk.def ... 40
emitting double-array: 100% |###########################################|
/usr/share/mecab/dic/ipadic/model.def is not found. skipped.
reading /usr/share/mecab/dic/ipadic/Adj.csv ... 27210
reading /usr/share/mecab/dic/ipadic/Adnominal.csv ... 135
reading /usr/share/mecab/dic/ipadic/Adverb.csv ... 3032
reading /usr/share/mecab/dic/ipadic/Auxil.csv ... 199
reading /usr/share/mecab/dic/ipadic/Conjunction.csv ... 171
reading /usr/share/mecab/dic/ipadic/Filler.csv ... 19
reading /usr/share/mecab/dic/ipadic/Interjection.csv ... 252
reading /usr/share/mecab/dic/ipadic/Noun.adjv.csv ... 3328
reading /usr/share/mecab/dic/ipadic/Noun.adverbal.csv ... 795
reading /usr/share/mecab/dic/ipadic/Noun.csv ... 60477
reading /usr/share/mecab/dic/ipadic/Noun.demonst.csv ... 120
reading /usr/share/mecab/dic/ipadic/Noun.nai.csv ... 42
reading /usr/share/mecab/dic/ipadic/Noun.name.csv ... 34202
reading /usr/share/mecab/dic/ipadic/Noun.number.csv ... 42
reading /usr/share/mecab/dic/ipadic/Noun.org.csv ... 16668
reading /usr/share/mecab/dic/ipadic/Noun.others.csv ... 151
reading /usr/share/mecab/dic/ipadic/Noun.place.csv ... 72999
reading /usr/share/mecab/dic/ipadic/Noun.proper.csv ... 27327
reading /usr/share/mecab/dic/ipadic/Noun.verbal.csv ... 12146
reading /usr/share/mecab/dic/ipadic/Others.csv ... 2
reading /usr/share/mecab/dic/ipadic/Postp-col.csv ... 91
reading /usr/share/mecab/dic/ipadic/Postp.csv ... 146
reading /usr/share/mecab/dic/ipadic/Prefix.csv ... 221
reading /usr/share/mecab/dic/ipadic/Suffix.csv ... 1393
reading /usr/share/mecab/dic/ipadic/Symbol.csv ... 208
reading /usr/share/mecab/dic/ipadic/Verb.csv ... 130750
emitting double-array: 100% |###########################################|
reading /usr/share/mecab/dic/ipadic/matrix.def ... 1316x1316
emitting matrix      : 100% |###########################################|

done!
update-alternatives: using /var/lib/mecab/dic/ipadic-utf8 to provide /var/lib/mecab/dic/debian (mecab-dictionary) in auto mode
Setting up mysql-community-server (8.0.16-2ubuntu18.04) ...
update-alternatives: using /etc/mysql/mysql.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode
dpkg: error processing package mysql-community-server (--configure):
 installed mysql-community-server package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-community-server (= 8.0.16-2ubuntu18.04); however:
  Package mysql-community-server is not configured yet.

dpkg: error processing package mysql-server (--configure):
 dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.27-3ubuntu1) ...
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          Errors were encountered while processing:E: Sub-process /usr/bin/dpkg returned an error code (1)

감사합니다, 리카르도

다른 질문의 권장 사항을 따랐지만 작동하지 않았지만 질문이 중복된다는 데 동의합니다.

답변1

유용한 링크를 찾았습니다.https://github.com/Microsoft/WSL/issues/3631, @jw-redpanda는 내 문제에 대해 약간의 힌트를 주었습니다. 그는 Windows에서 WSL을 사용하는 MySql 8.0의 설치 문제를 언급했습니다. MySQl이 시작되지 않습니다. 그는 해결 방법을 제시했습니다. 저는 최소한 버전 5.7을 설치할 수 있었지만 후보로 버전 8이 있는 경우 5단계 이후에는 진행할 수 없었습니다. 다른 사람들에게도 효과가 있었으니 행운을 빕니다.

답변2

WSL 2(WSL 1로 추정)에서는 systemd를 기본값으로 사용할 수 없으며 init.d 스크립트는 시작 시 실행되지 않습니다.

게다가 여기 deb 패키지에서 MySQL 8을 설치하면https://dev.mysql.com/downloads/repo/apt/MySQL을 시작하거나 중지하는 데 사용되는 기본 mysql.server 도우미 스크립트는 설치되지 않습니다.

한 가지 해결책은 여기에서 mysql.server.sh 스크립트를 다운로드하는 것입니다.https://github.com/mysql/mysql-server/tree/8.0/support-files그런 다음 스크립트를 복사하고 이름을 /etc/init.d/mysql로 ​​바꿉니다(실행 가능한지 확인하세요 - chmod +x mysql).

그런 다음 basdir, datadir 및 pid 파일 위치에 대한 기본값을 설정해야 합니다.

여기에 몇 가지 다른 팁과 함께 전체 내용이 나와 있습니다.https://www.58bits.com/blog/2020/05/03/installing-mysql-80-under-wsl-2-and-ubuntu

관련 정보