Você deixou os pacotes em um estado não configurado. Você precisa remover os arquivos de bloqueio do debconf e consertar os pacotes não configurados.
sudo rm /var/cache/debconf/*.dat
sudo apt-get install -f
Eu estava instalando o lamp-server ^ com o comando
sudo apt-get install lamp-server^
quando pendurado nesta seção:
Setting up mysql-server-5.7 (5.7.15-0ubuntu0.16.04.1) ...
update-alternatives: using /etc/mysql/mysql.cnf to provide /etc/mysql/my.cnf (my.cnf) in auto mode
Renaming removed key_buffer and myisam-recover options (if present)
Eu tentei ctrl + c sem sucesso, e depois fora do habbit hit ctrl-z, que suspendeu ou algo assim. Usando o fg, ele imediatamente saiu, mas deixou o dpkg em um estado ímpar de bloqueio.
Eu tentei
sudo dpkg --configure -a
antes e depois
sudo rm /var/lib/apt/lists/lock
sudo rm /var/cache/apt/archives/lock
mas sem sucesso. Se eu tentar --configurar -a ou apt-get upgrade eu recebo isto:
theelous3@compoopr:/var/lib/dpkg/updates$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
linux-generic linux-headers-generic linux-image-generic
0 upgraded, 0 newly installed, 0 to remove and 3 not upgraded.
11 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
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
Setting up mysql-server-5.7 (5.7.15-0ubuntu0.16.04.1) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing package mysql-server-5.7 (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up php7.0-common (7.0.8-0ubuntu0.16.04.3) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing package php7.0-common (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of php7.0-json:
php7.0-json depends on php7.0-common (= 7.0.8-0ubuntu0.16.04.3); however:
Package php7.0-common is not configured yet.
dpkg: error processing package php7.0-json (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php7.0-opcache:
php7.0-opcache depends on php7.0-common (= 7.0.8-0ubuntu0.16.04.3); however:
Package php7.0-common is not configured yet.
dpkg: error processing package php7.0-opcache (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php7.0-readline:
php7.0-readline depends on php7.0-common (= 7.0.8-0ubuntu0.16.04.3); however:
Package php7.0-common is not configured yet.
dpkg: error processing package php7.0-readline (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php7.0-cli:
php7.0-cli depends on php7.0-common (= 7.0.8-0ubuntu0.16.04.3); however:
Package php7.0-common is not configured yet.
php7.0-cli depends on php7.0-json; however:
Package php7.0-json is not configured yet.
php7.0-cli depends on php7.0-opcache; however:
Package php7.0-opcache is not configured yet.
php7.0-cli depends on php7.0-readline; however:
Package php7.0-readline is not configured yet.
dpkg: error processing package php7.0-cli (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libapache2-mod-php7.0:
libapache2-mod-php7.0 depends on php7.0-cli; however:
Package php7.0-cli is not configured yet.
libapache2-mod-php7.0 depends on php7.0-common (= 7.0.8-0ubuntu0.16.04.3); however:
Package php7.0-common is not configured yet.
libapache2-mod-php7.0 depends on php7.0-json; however:
Package php7.0-json is not configured yet.
libapache2-mod-php7.0 depends on php7.0-opcache; however:
Package php7.0-opcache is not configured yet.
dpkg: error processing package libapache2-mod-php7.0 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libapache2-mod-php:
libapache2-mod-php depends on libapache2-mod-php7.0; however:
Package libapache2-mod-php7.0 is not configured yet.
dpkg: error processing package libapache2-mod-php (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of mysql-server:
mysql-server depends on mysql-server-5.7; however:
Package mysql-server-5.7 is not configured yet.
dpkg: error processing package mysql-server (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php7.0-mysql:
php7.0-mysql depends on php7.0-common (= 7.0.8-0ubuntu0.16.04.3); however:
Package php7.0-common is not configured yet.
dpkg: error processing package php7.0-mysql (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php-mysql:
php-mysql depends on php7.0-mysql; however:
Package php7.0-mysql is not configured yet.
dpkg: error processing package php-mysql (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
mysql-server-5.7
php7.0-common
php7.0-json
php7.0-opcache
php7.0-readline
php7.0-cli
libapache2-mod-php7.0
libapache2-mod-php
mysql-server
php7.0-mysql
php-mysql
E: Sub-process /usr/bin/dpkg returned an error code (1)
Você deixou os pacotes em um estado não configurado. Você precisa remover os arquivos de bloqueio do debconf e consertar os pacotes não configurados.
sudo rm /var/cache/debconf/*.dat
sudo apt-get install -f