Kali Linux 운영 체제에 MySQL 설치(E: 하위 프로세스 /usr/bin/dpkg가 오류 코드(1)를 반환함)

Kali Linux 운영 체제에 MySQL 설치(E: 하위 프로세스 /usr/bin/dpkg가 오류 코드(1)를 반환함)

Kali Linux 운영 체제에 MySQL을 설치하려고 하면 설치가 끝날 때 "E: 하위 프로세스 /usr/bin/dpkg가 오류 코드(1)를 반환했습니다." 오류가 나타납니다. 누군가 아이디어가 있다면 이 문제를 해결하는 방법을 알고 싶습니다.

설치 개요는 다음과 같습니다.

(kaliuser㉿kali)-[~]
└─$ sudo apt-get install mysql-server mysql-common                                                                                       1 ⚙
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-community-client mysql-community-client-core
  mysql-community-client-plugins 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-client-plugins mysql-community-server mysql-community-server-core mysql-server
0 upgraded, 12 newly installed, 0 to remove and 1218 not upgraded.
Need to get 83.9 kB/31.2 MB of archives.
After this operation, 254 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://repo.mysql.com/apt/ubuntu bionic/mysql-8.0 amd64 mysql-server amd64 8.0.23-1ubuntu18.04 [83.9 kB]
Fetched 83.9 kB in 2s (49.8 kB/s)  
Preconfiguring packages ...
Selecting previously unselected package mysql-common.
(Reading database ... 259395 files and directories currently installed.)
Preparing to unpack .../00-mysql-common_8.0.23-1ubuntu18.04_amd64.deb ...
Unpacking mysql-common (8.0.23-1ubuntu18.04) ...
Selecting previously unselected package mysql-community-client-plugins.
Preparing to unpack .../01-mysql-community-client-plugins_8.0.23-1ubuntu18.04_amd64.deb ...


.......




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
Processing triggers for libc-bin (2.31-4) ...
Processing triggers for man-db (2.9.3-2) ...
Processing triggers for kali-menu (2020.4.0) ...
Errors were encountered while processing:
 mysql-common
 mysql-community-server
 mysql-server
 mysql-community-client
 mysql-client
**E: Sub-process /usr/bin/dpkg returned an error code (1)**

답변1

Kali Linux에서는 MYSQL이 MariaDB로 대체되었습니다. Ubuntu 18.04용 MYSQL apt 저장소를 추가했기 때문에 apt이것이 손상되었습니다.

손상 문제를 해결하려면 apt파일을 백업하고 /var/lib/dpkg/status다음 패키지와 설명을 제거하여 편집하십시오. mysql-common mysql-community-server mysql-server mysql-community-client mysql-client그런 다음 MariaDB를 설치하십시오.

sudo dpkg --configure -a
sudo apt update
sudo apt install mariadb-server mariadb-client

관련 정보