Ubuntu 18.04에 MySQL을 설치하려고 합니다. 이를 위해 먼저 다음 명령을 사용하여 패키지를 다운로드했습니다.
wget -c https://dev.mysql.com/get/mysql-apt-config_0.8.12-1_all.deb
그런 다음 다음 명령을 실행합니다.
sudo dpkg -i mysql-apt-config_0.8.12-1_all.deb
하지만 종속성 문제가 있는데 해당 종속성이 무엇인지 모르겠습니다. 이것은 내가 받은 메시지의 일부입니다:
Configuring mysql-community-server (8.0.15-1ubuntu18.04) ...
Job for mysql.service failed because the control process exited with error code.
See "systemctl status mysql.service" and "journalctl -xe" for details.
Job for mysql.service failed because the control process exited with error code.
See "systemctl status mysql.service" and "journalctl -xe" for details.
invoke-rc.d: initscript mysql, action "start" failed.
● mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2019-03-12 01:06:40 CET; 17ms ago
Docs: man:mysqld(8)
http://dev.mysql.com/doc/refman/en/using-systemd.html
Process: 12302 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE)
Process: 12263 ExecStartPre=/usr/share/mysql-8.0/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
Main PID: 12302 (code=exited, status=1/FAILURE)
Status: "SERVER_BOOTING"
mar 12 01:06:39 R2D2 systemd[1]: Starting MySQL Community Server...
mar 12 01:06:40 R2D2 systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE
mar 12 01:06:40 R2D2 systemd[1]: mysql.service: Failed with result 'exit-code'.
mar 12 01:06:40 R2D2 systemd[1]: Failed to start MySQL Community Server.
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.15-1ubuntu18.04); however:
Package mysql-community-server is not configured yet.
dpkg: error processing package mysql-server (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of mysql-community-server-dbgsym:
mysql-community-server-dbgsym depends on mysql-community-server (= 8.0.15-1ubuntu18.04); however:
Package mysql-community-server is not configured yet.
dpkg: error processing package mysql-community-server-dbgsym (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
mysql-community-server
mysql-server
mysql-community-server-dbgsym
E: Sub-process /usr/bin/dpkg returned an error code (1)
내 상담 로그는 다음과 같습니다 journalctl -xe
.
josecarlos@R2D2:~/Descargas$ journalctl -xe
mar 12 01:35:01 R2D2 CRON[13062]: pam_unix(cron:session): session closed for user root
mar 12 01:36:01 R2D2 org.gnome.Shell.desktop[1874]: (/usr/lib/firefox/firefox:10916): dconf-WARNING **: 01:36:01.2
mar 12 01:36:39 R2D2 sudo[13085]: josecarlos : TTY=pts/0 ; PWD=/home/josecarlos/Descargas ; USER=root ; COMMAND=/u
mar 12 01:36:39 R2D2 sudo[13085]: pam_unix(sudo:session): session opened for user root by (uid=0)
mar 12 01:36:40 R2D2 systemd[1]: Starting MySQL Community Server...
-- Subject: Unit mysql.service has begun start-up
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit mysql.service has begun starting up.
mar 12 01:36:40 R2D2 audit[13150]: AVC apparmor="STATUS" operation="profile_replace" info="same as current profile
mar 12 01:36:40 R2D2 kernel: audit: type=1400 audit(1552351000.784:89): apparmor="STATUS" operation="profile_repla
mar 12 01:36:41 R2D2 systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE
mar 12 01:36:41 R2D2 systemd[1]: mysql.service: Failed with result 'exit-code'.
mar 12 01:36:41 R2D2 systemd[1]: Failed to start MySQL Community Server.
-- Subject: Unit mysql.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit mysql.service has failed.
--
-- The result is RESULT.
mar 12 01:36:41 R2D2 sudo[13085]: pam_unix(sudo:session): session closed for user root
출력 sudo apt update && sudo apt upgrade
:
Hit:1 http://es.archive.ubuntu.com/ubuntu bionic InRelease
Hit:2 http://repo.mysql.com/apt/ubuntu bionic InRelease
Hit:3 http://archive.canonical.com/ubuntu bionic InRelease
Hit:4 https://deb.nodesource.com/node_11.x bionic InRelease
Hit:5 http://packages.microsoft.com/repos/vscode stable InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up mysql-community-server (8.0.15-1ubuntu18.04) ...
Job for mysql.service failed because the control process exited with error code.
See "systemctl status mysql.service" and "journalctl -xe" for details.
Job for mysql.service failed because the control process exited with error code.
See "systemctl status mysql.service" and "journalctl -xe" for details.
invoke-rc.d: initscript mysql, action "start" failed.
* mysql.service - MySQL Community Server
Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Tue 2019-03-12 12:17:46 CET; 8ms ago
Docs: man:mysqld(8)
http://dev.mysql.com/doc/refman/en/using-systemd.html
Process: 8839 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE)
Process: 8800 ExecStartPre=/usr/share/mysql-8.0/mysql-systemd-start pre (code=exited, status=0/SUCCESS)
Main PID: 8839 (code=exited, status=1/FAILURE)
Status: "SERVER_BOOTING"
mar 12 12:17:45 R2D2 systemd[1]: Starting MySQL Community Server...
mar 12 12:17:46 R2D2 systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE
mar 12 12:17:46 R2D2 systemd[1]: mysql.service: Failed with result 'exit-code'.
mar 12 12:17:46 R2D2 systemd[1]: Failed to start MySQL Community Server.
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.15-1ubuntu18.04); however:
Package mysql-community-server is not configured yet.
dpkg: error processing package mysql-server (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of mysql-community-server-dbgsym:
mysql-community-server-dbgsym depends on mysql-community-server (= 8.0.15-1ubuntu18.04); however:
Package mysql-community-server is not configured yet.
dpkg: error processing package mysql-community-server-dbgsym (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
mysql-community-server
mysql-server
mysql-community-server-dbgsym
E: Sub-process /usr/bin/dpkg returned an error code (1)
저는 이전에 노트북에 mysql-server-5.5를 설치했다는 큰 실수를 저질렀습니다. 다 삭제하고 지운 뒤 다시 설치해봤는데 안되네요.
이 명령의 로그는 다음 sudo apt install mysql-server
과 같습니다.
josecarlos@R2D2:~$ LANG=C sudo apt install mysql-server
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libmecab2 mecab-ipadic mecab-ipadic-utf8 mecab-utils mysql-client mysql-common mysql-community-client mysql-community-client-core mysql-community-server
mysql-community-server-core
The following NEW packages will be installed:
libmecab2 mecab-ipadic mecab-ipadic-utf8 mecab-utils mysql-client mysql-common mysql-community-client mysql-community-client-core mysql-community-server
mysql-community-server-core mysql-server
0 upgraded, 11 newly installed, 0 to remove and 0 not upgraded.
Need to get 58,3 MB of archives.
After this operation, 418 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://es.archive.ubuntu.com/ubuntu bionic/universe amd64 libmecab2 amd64 0.996-5 [257 kB]
Get:2 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 mysql-common amd64 8.0.15-1ubuntu18.04 [84,4 kB]
Get:3 http://es.archive.ubuntu.com/ubuntu bionic/universe amd64 mecab-utils amd64 0.996-5 [4.856 B]
Get:4 http://es.archive.ubuntu.com/ubuntu bionic/universe amd64 mecab-ipadic all 2.7.0-20070801+main-1 [12,1 MB]
Get:5 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 mysql-community-client-core amd64 8.0.15-1ubuntu18.04 [1.450 kB]
Get:6 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 mysql-community-client amd64 8.0.15-1ubuntu18.04 [2.310 kB]
Get:7 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 mysql-client amd64 8.0.15-1ubuntu18.04 [81,0 kB]
Get:8 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 mysql-community-server-core amd64 8.0.15-1ubuntu18.04 [17,6 MB]
Get:9 http://es.archive.ubuntu.com/ubuntu bionic/universe amd64 mecab-ipadic-utf8 all 2.7.0-20070801+main-1 [3.522 B]
Get:10 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 mysql-community-server amd64 8.0.15-1ubuntu18.04 [24,2 MB]
Get:11 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 mysql-server amd64 8.0.15-1ubuntu18.04 [81,0 kB]
Fetched 58,3 MB in 2s (30,7 MB/s)
Preconfiguring packages ...
Selecting previously unselected package mysql-common.
(Reading database ... 821063 files and directories currently installed.)
Preparing to unpack .../00-mysql-common_8.0.15-1ubuntu18.04_amd64.deb ...
Unpacking mysql-common (8.0.15-1ubuntu18.04) ...
Selecting previously unselected package mysql-community-client-core.
Preparing to unpack .../01-mysql-community-client-core_8.0.15-1ubuntu18.04_amd64.deb ...
Unpacking mysql-community-client-core (8.0.15-1ubuntu18.04) ...
Selecting previously unselected package mysql-community-client.
Preparing to unpack .../02-mysql-community-client_8.0.15-1ubuntu18.04_amd64.deb ...
Unpacking mysql-community-client (8.0.15-1ubuntu18.04) ...
Selecting previously unselected package mysql-client.
Preparing to unpack .../03-mysql-client_8.0.15-1ubuntu18.04_amd64.deb ...
Unpacking mysql-client (8.0.15-1ubuntu18.04) ...
Selecting previously unselected package libmecab2:amd64.
Preparing to unpack .../04-libmecab2_0.996-5_amd64.deb ...
Unpacking libmecab2:amd64 (0.996-5) ...
Selecting previously unselected package mysql-community-server-core.
Preparing to unpack .../05-mysql-community-server-core_8.0.15-1ubuntu18.04_amd64.deb ...
Unpacking mysql-community-server-core (8.0.15-1ubuntu18.04) ...
Selecting previously unselected package mysql-community-server.
Preparing to unpack .../06-mysql-community-server_8.0.15-1ubuntu18.04_amd64.deb ...
Unpacking mysql-community-server (8.0.15-1ubuntu18.04) ...
Selecting previously unselected package mecab-utils.
Preparing to unpack .../07-mecab-utils_0.996-5_amd64.deb ...
Unpacking mecab-utils (0.996-5) ...
Selecting previously unselected package mecab-ipadic.
Preparing to unpack .../08-mecab-ipadic_2.7.0-20070801+main-1_all.deb ...
Unpacking mecab-ipadic (2.7.0-20070801+main-1) ...
Selecting previously unselected package mecab-ipadic-utf8.
Preparing to unpack .../09-mecab-ipadic-utf8_2.7.0-20070801+main-1_all.deb ...
Unpacking mecab-ipadic-utf8 (2.7.0-20070801+main-1) ...
Selecting previously unselected package mysql-server.
Preparing to unpack .../10-mysql-server_8.0.15-1ubuntu18.04_amd64.deb ...
Unpacking mysql-server (8.0.15-1ubuntu18.04) ...
Setting up mysql-common (8.0.15-1ubuntu18.04) ...
Setting up libmecab2:amd64 (0.996-5) ...
Setting up mysql-community-client-core (8.0.15-1ubuntu18.04) ...
Setting up mysql-community-server-core (8.0.15-1ubuntu18.04) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Processing triggers for man-db (2.8.3-2) ...
Setting up mecab-utils (0.996-5) ...
Setting up mysql-community-client (8.0.15-1ubuntu18.04) ...
Setting up mecab-ipadic (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/Noun.nai.csv ... 42
reading /usr/share/mecab/dic/ipadic/Interjection.csv ... 252
reading /usr/share/mecab/dic/ipadic/Adj.csv ... 27210
reading /usr/share/mecab/dic/ipadic/Noun.others.csv ... 151
reading /usr/share/mecab/dic/ipadic/Others.csv ... 2
reading /usr/share/mecab/dic/ipadic/Noun.place.csv ... 72999
reading /usr/share/mecab/dic/ipadic/Suffix.csv ... 1393
reading /usr/share/mecab/dic/ipadic/Noun.proper.csv ... 27327
reading /usr/share/mecab/dic/ipadic/Adverb.csv ... 3032
reading /usr/share/mecab/dic/ipadic/Noun.demonst.csv ... 120
reading /usr/share/mecab/dic/ipadic/Filler.csv ... 19
reading /usr/share/mecab/dic/ipadic/Noun.adverbal.csv ... 795
reading /usr/share/mecab/dic/ipadic/Symbol.csv ... 208
reading /usr/share/mecab/dic/ipadic/Postp.csv ... 146
reading /usr/share/mecab/dic/ipadic/Conjunction.csv ... 171
reading /usr/share/mecab/dic/ipadic/Noun.name.csv ... 34202
reading /usr/share/mecab/dic/ipadic/Noun.csv ... 60477
reading /usr/share/mecab/dic/ipadic/Noun.verbal.csv ... 12146
reading /usr/share/mecab/dic/ipadic/Noun.adjv.csv ... 3328
reading /usr/share/mecab/dic/ipadic/Prefix.csv ... 221
reading /usr/share/mecab/dic/ipadic/Adnominal.csv ... 135
reading /usr/share/mecab/dic/ipadic/Auxil.csv ... 199
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/Verb.csv ... 130750
reading /usr/share/mecab/dic/ipadic/Postp-col.csv ... 91
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 to provide /var/lib/mecab/dic/debian (mecab-dictionary) in auto mode
Setting up mysql-client (8.0.15-1ubuntu18.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/Noun.nai.csv ... 42
reading /usr/share/mecab/dic/ipadic/Interjection.csv ... 252
reading /usr/share/mecab/dic/ipadic/Adj.csv ... 27210
reading /usr/share/mecab/dic/ipadic/Noun.others.csv ... 151
reading /usr/share/mecab/dic/ipadic/Others.csv ... 2
reading /usr/share/mecab/dic/ipadic/Noun.place.csv ... 72999
reading /usr/share/mecab/dic/ipadic/Suffix.csv ... 1393
reading /usr/share/mecab/dic/ipadic/Noun.proper.csv ... 27327
reading /usr/share/mecab/dic/ipadic/Adverb.csv ... 3032
reading /usr/share/mecab/dic/ipadic/Noun.demonst.csv ... 120
reading /usr/share/mecab/dic/ipadic/Filler.csv ... 19
reading /usr/share/mecab/dic/ipadic/Noun.adverbal.csv ... 795
reading /usr/share/mecab/dic/ipadic/Symbol.csv ... 208
reading /usr/share/mecab/dic/ipadic/Postp.csv ... 146
reading /usr/share/mecab/dic/ipadic/Conjunction.csv ... 171
reading /usr/share/mecab/dic/ipadic/Noun.name.csv ... 34202
reading /usr/share/mecab/dic/ipadic/Noun.csv ... 60477
reading /usr/share/mecab/dic/ipadic/Noun.verbal.csv ... 12146
reading /usr/share/mecab/dic/ipadic/Noun.adjv.csv ... 3328
reading /usr/share/mecab/dic/ipadic/Prefix.csv ... 221
reading /usr/share/mecab/dic/ipadic/Adnominal.csv ... 135
reading /usr/share/mecab/dic/ipadic/Auxil.csv ... 199
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/Verb.csv ... 130750
reading /usr/share/mecab/dic/ipadic/Postp-col.csv ... 91
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.15-1ubuntu18.04) ...
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.15-1ubuntu18.04); however:
Package mysql-community-server is not configured yet.
dpkg: error processing package mysql-server (--configure):
dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
mysql-community-server
mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)
이제 내 노트북에 설치된 mysql-server 패키지는 다음과 같습니다.
지금 내가 뭘 잘못하고 있는지 모르겠습니다.
답변1
이로 인해 문제가 해결되었습니다(MySQL 8.0 - Ubuntu 20.04).
sudo apt-get purge mysql\* libmysql\*
sudo apt autoremove
하지만 패키지 "mysql-클라이언트-코어-8.0"제거하지 마세요. 그러니까...
sudo apt --fix-broken install
sudo apt-get --reinstall install mysql-client-core-8.0
sudo apt-get purge mysql\* libmysql\*
sudo apt autoremove
sudo apt update
sudo apt install mysql-server
더 이상 오류는 없습니다!
답변2
여기에는 두 가지 문제가 있습니다.
3 not fully installed or removed
실수. 실행할 때sudo apt update && sudo apt upgrade
. 이는 패키지가 손상되었음을 의미합니다. 강제로 삭제해야 합니다. 달리기sudo apt-get autoclean && sudo apt-get --force-yes remove mysql-community-server-dbgsym mysql-community-server mysql-server
지금은 MySQL을 시작할 수 없습니다. 14.04에서 업그레이드하여 libmysqlclient18과 같은 일부 오래된 패키지를 남겨둔 것으로 보입니다. (Bionic (18.04)에는 libmysqlclient20이 있습니다)
모든 MySQL 관련 패키지를 제거하고 MySQL을 "새로 설치"합니다. 달리기
sudo apt remove --purge libapache2-mod-auth-mysql libmysqlclient18:i386 libmysqlclient18:amd64 mysql-common mysql-community-client mysql-community-client-core mysql-community-server mysql-community-server-core mysql-server
MySQL을 다시 설치하고,
sudo apt install mysql-server
추가 자료:
답변3
비슷한 문제가 발생하여 다양한 패키지를 설치/제거/재설치하려고 시도했지만 동일한 오류 메시지가 계속해서 표시되었습니다.
마지막으로 아래의 MariaDB 패키지(동일한 mysql 종속성이 많이 포함되어 있음)를 설치하면 문제가 해결되었습니다.
sudo apt install mariadb-client-core-10.3