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

おすすめ記事