web-dev-qa-db-ja.com

dpkg:エラー処理パッケージmysql-server(--configure)

端末およびソフトウェアアップデータを介してremoveautoremoveinstallupgradeなどの場合、次のエラーが表示されます。

Sudo apt-get autoremove結果は以下のとおりです。このエラーは、mypkg-serverの処理中にdpkgエラーが発生したことを示しています。

Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up mysql-server-5.5 (5.5.49-0ubuntu0.14.04.1) ...
start: Job failed to start
invoke-rc.d: initscript mysql, action "start" failed.
No apport report written because the error message indicates its a followup error from a previous failure.
                      dpkg: error processing package mysql-server-5.5 (--configure):
 subprocess installed post-installation script returned error exit status 1
 dpkg: dependency problems prevent configuration of mysql-server:
  mysql-server depends on mysql-server-5.5; however:
  Package mysql-server-5.5 is not configured yet.

 dpkg: error processing package mysql-server (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 mysql-server-5.5
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

このリンクも参照: link

Mysqlの再構成を支援します。

dpkgの再構成も試みました。 (質問を複製する前に検討してください)

Edit 1:私のubuntuバージョンは14.04 LTSです

編集2Sudo apt-get upgrade結果:

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.
2 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-server-5.5 (5.5.49-0ubuntu0.14.04.1) ...
start: Job failed to start
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing package mysql-server-5.5 (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-5.5; however:
  Package mysql-server-5.5 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-server-5.5
 mysql-server
E: Sub-process /usr/bin/dpkg returned an error code (1)

Sudo dpkg --configure -a結果:

Setting up mysql-server-5.5 (5.5.49-0ubuntu0.14.04.1) ...
start: Job failed to start
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing package mysql-server-5.5 (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of mysql-server:
 mysql-server depends on mysql-server-5.5; however:
  Package mysql-server-5.5 is not configured yet.

dpkg: error processing package mysql-server (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 mysql-server-5.5
 mysql-server

Sudo apt-get remove mysql-server結果:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  mysql-server
0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
2 not fully installed or removed.
After this operation, 131 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 209845 files and directories currently installed.)
Removing mysql-server (5.5.49-0ubuntu0.14.04.1) ...
Setting up mysql-server-5.5 (5.5.49-0ubuntu0.14.04.1) ...
 start: Job failed to start
invoke-rc.d: initscript mysql, action "start" failed.
dpkg: error processing package mysql-server-5.5 (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 mysql-server-5.5
E: Sub-process /usr/bin/dpkg returned an error code (1)
2
anand mbs

これは私のために働いた

Sudo apt-get purge mysql*
Sudo apt-get autoremove
Sudo apt-get autoclean
Sudo apt-get dist-upgrade

その後、mysqlを再度インストールしました

Sudo apt-get install mysql-server 

そして今はうまく機能しています。

4

aptメソッドはどれもうまくいきませんでした。これを試してください:

ロックプロセスの検索

$ ps -eaf
root      7316     1  0 00:19 ?        00:00:00 /usr/bin/dpkg --status-fd 35 --configure --pending
root      7808  7316  0 00:19 ?        00:00:00 /usr/bin/Perl -w /usr/share/debconf/frontend /var/lib/dpkg/info/mysql-se
root      7817  7808  0 00:19 ?        00:00:00 /bin/bash /var/lib/dpkg/info/mysql-server-5.7.postinst configure
mysql     7973  7817  0 00:20 ?        00:00:00 mysqld --user=mysql --init-file=/var/lib/mysql-files/tmp.iNyY06ty0K --so

殺す

Sudo kill -9 7973、基本的にmysqlを実行します。

現在のパージ

Sudo apt-get purge mysql-server-5.7 # Or whatever you are trying to purge.
1
Ganesh K