上周 ubuntu 要求安装一些更新。安装后出现了一系列问题(之前一切都运行正常……)现在我无法使用和apt-get
命令,因为这些“缺少依赖项”……
这些问题似乎与 、 和 有关man-db
。openssh-server
我r-base
唯一知道的是,R
Ubuntu 尝试安装的新版本(通过包管理器)是测试版。无论如何,我没想到会有这样的自动建议……这就是我得到的
michele@eaaqdev01:~$ sudo apt-get autoremove -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
openssh-server
Suggested packages:
rssh molly-guard openssh-blacklist openssh-blacklist-extra monkeysphere
The following packages will be REMOVED:
dpatch walinuxagent-data-saver
The following packages will be upgraded:
openssh-server
1 upgraded, 0 newly installed, 2 to remove and 0 not upgraded.
25 not fully installed or removed.
Need to get 0 B/338 kB of archives.
After this operation, 280 kB disk space will be freed.
Do you want to continue [Y/n]? Y
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
(Reading database ... 181945 files and directories currently installed.)
Removing dpatch ...
Removing walinuxagent-data-saver ...
Setting up ca-certificates (20130906ubuntu0.12.04.1) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing ca-certificates (--configure):
subprocess installed post-installation script returned error exit status 1
No apport report written because MaxReports is reached already
man-db
片:
Setting up man-db (2.6.1-2ubuntu1) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing man-db (--configure):
subprocess installed post-installation script returned error exit status 1
No apport report written because MaxReports is reached already
openssh
片:
Setting up openssh-client (1:5.9p1-5ubuntu1.2) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing openssh-client (--configure):
subprocess installed post-installation script returned error exit status 1
No apport report written because MaxReports is reached already
dpkg: dependency problems prevent configuration of openssh-server:
openssh-server depends on openssh-client (= 1:5.9p1-5ubuntu1.1); however:
Version of openssh-client on system is 1:5.9p1-5ubuntu1.2.
dpkg: error processing openssh-server (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
r-base
片:
Setting up r-base-core (3.0.3.20140328-1precise0) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing r-base-core (--configure):
subprocess installed post-installation script returned error exit status 1
No apport report written because MaxReports is reached already
dpkg: dependency problems prevent configuration of r-cran-boot:
r-cran-boot depends on r-base-core (>= 3.0.3-1precise0); however:
Package r-base-core is not configured yet.
dpkg: error processing r-cran-boot (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
dpkg: dependency problems prevent configuration of r-cran-cluster:
r-cran-cluster depends on r-base-core (>= 3.0.3.20140328-1precise0); however:
Package r-base-core is not configured yet.
dpkg: error processing r-cran-cluster (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
dpkg: dependency problems prevent configuration of r-cran-foreign:
r-cran-foreign depends on r-base-core (>= 3.0.3-1precise0); however:
Package r-base-core is not configured yet.
dpkg: error processing r-cran-foreign (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
dpkg: dependency problems prevent configuration of r-cran-mass:
r-cran-mass depends on r-base-core (>= 3.0.3-1precise0); however:
Package r-base-core is not configured yet.
dpkg: error processing r-cran-mass (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
dpkg: dependency problems prevent configuration of r-cran-kernsmooth:
r-cran-kernsmooth depends on r-base-core (>= 3.0.3-1precise0); however:
Package r-base-core is not configured yet.
r-cran-kernsmooth depends on r-cran-mass; however:
Package r-cran-mass is not configured yet.
dpkg: error processing r-cran-kernsmooth (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
dpkg: dependency problems prevent configuration of r-cran-nlme:
r-cran-nlme depends on r-base-core (>= 3.0.3.20140328-1precise0); however:
Package r-base-core is not configured yet.
dpkg: error processing r-cran-nlme (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
dpkg: dependency problems prevent configuration of r-cran-matrix:
r-cran-matrix depends on r-base-core (>= 3.0.3.20140328-1precise0); however:
Package r-base-core is not configured yet.
dpkg: error processing r-cran-matrix (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
dpkg: dependency problems prevent configuration of r-cran-mgcv:
r-cran-mgcv depends on r-base-core (>= 3.0.3.20140328-1precise0); however:
Package r-base-core is not configured yet.
r-cran-mgcv depends on r-cran-nlme; however:
Package r-cran-nlme is not configured yet.
r-cran-mgcv depends on r-cran-matrix; however:
Package r-cran-matrix is not configured yet.
dpkg: error processing r-cran-mgcv (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
dpkg: dependency problems prevent configuration of r-cran-rpart:
r-cran-rpart depends on r-base-core (>= 3.0.3-1precise0); however:
Package r-base-core is not configured yet.
dpkg: error processing r-cran-rpart (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
dpkg: dependency problems prevent configuration of r-cran-class:
r-cran-class depends on r-base-core (>= 3.0.3-1precise0); however:
Package r-base-core is not configured yet.
r-cran-class depends on r-cran-mass; however:
Package r-cran-mass is not configured yet.
dpkg: error processing r-cran-class (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
dpkg: dependency problems prevent configuration of r-cran-nnet:
r-cran-nnet depends on r-base-core (>= 3.0.3.20140328-1precise0); however:
Package r-base-core is not configured yet.
dpkg: error processing r-cran-nnet (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
dpkg: dependency problems prevent configuration of r-recommended:
r-recommended depends on r-base-core (>= 3.0.3.20140328-1precise0); however:
Package r-base-core is not configured yet.
r-recommended depends on r-cran-boot (>= 1.2.19); however:
Package r-cran-boot is not configured yet.
r-recommended depends on r-cran-cluster (>= 1.9.6-2); however:
Package r-cran-cluster is not configured yet.
r-recommended depends on r-cran-foreign (>= 0.7-2); however:
Package r-cran-foreign is not configured yet.
r-recommended depends on r-cran-kernsmooth (>= 2.2.14); however:
Package r-cran-kernsmooth is not configured yet.
r-recommended depends on r-cran-mgcv (>= 1.1.5); however:
Package r-cran-mgcv is not configured yet.
r-recommended depends on r-cran-nlme (>= 3.1.52); however:
Package r-cran-nlme is not configured yet.
r-recommended depends on r-cran-rpart (>= 3.1.20); however:
Package r-cran-rpart is not configured yet.
r-recommended depends on r-cran-mass; however:
Package r-cran-mass is not configured yet.
r-recommended depends on r-cran-class; however:
Package r-cran-class is not configured yet.
r-recommended depends on r-cran-nnet; however:
Package r-cran-nnet is not configured yet.
r-recommended depends on r-cran-matrix; however:
Package r-cran-matrix is not configured yet.
dpkg: error processing r-recommended (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
dpkg: dependency problems prevent configuration of r-base:
r-base depends on r-base-core (>= 3.0.3.20140328-1precise0); however:
Package r-base-core is not configured yet.
r-base depends on r-recommended (= 3.0.3.20140328-1precise0); however:
Package r-recommended is not configured yet.
dpkg: error processing r-base (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
dpkg: dependency problems prevent configuration of r-base-dev:
r-base-dev depends on r-base-core (>= 3.0.3.20140328-1precise0); however:
Package r-base-core is not configured yet.
dpkg: error processing r-base-dev (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
Setting up samba-common (2:3.6.3-2ubuntu2.10) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing samba-common (--configure):
subprocess installed post-installation script returned error exit status 1
No apport report written because MaxReports is reached already
dpkg: dependency problems prevent configuration of samba-common-bin:
samba-common-bin depends on samba-common (>= 2:3.4.0~pre1-2); however:
Package samba-common is not configured yet.
dpkg: error processing samba-common-bin (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
dpkg: dependency problems prevent configuration of smbclient:
smbclient depends on samba-common (= 2:3.6.3-2ubuntu2.10); however:
Package samba-common is not configured yet.
dpkg: error processing smbclient (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
dpkg: dependency problems prevent configuration of ssh-askpass-gnome:
ssh-askpass-gnome depends on openssh-client | ssh (>= 1:1.2pre7-4) | ssh-krb5; however:
Package openssh-client is not configured yet.
Package ssh is not installed.
Package ssh-krb5 is not installed.
dpkg: error processing ssh-askpass-gnome (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
Setting up cloud-init (0.6.3-0ubuntu1.12) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing cloud-init (--configure):
subprocess installed post-installation script returned error exit status 1
No apport report written because MaxReports is reached already
dpkg: dependency problems prevent configuration of r-base-html:
r-base-html depends on r-base-core; however:
Package r-base-core is not configured yet.
dpkg: error processing r-base-html (--configure):
dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already
Errors were encountered while processing:
ca-certificates
man-db
openssh-client
openssh-server
r-base-core
r-cran-boot
r-cran-cluster
r-cran-foreign
r-cran-mass
r-cran-kernsmooth
r-cran-nlme
r-cran-matrix
r-cran-mgcv
r-cran-rpart
r-cran-class
r-cran-nnet
r-recommended
r-base
r-base-dev
samba-common
samba-common-bin
smbclient
ssh-askpass-gnome
cloud-init
r-base-html
E: Sub-process /usr/bin/dpkg returned an error code (1)
抱歉转储了这么多代码,但我基本上陷入了困境。由于上述原因,任何 apt-get 操作都被阻止。这简直太荒谬了,因为我没有要求进行任何更新,我只是确认了 Ubuntu 所说的“重要更新”。
答案1
我通过以下方式解决了问题
sudo rm -f /etc/apt/sources.list.d/*
sudo dpkg -i /var/cache/apt/archives/*.deb
sudo dpkg --configure -a
答案2
错误报告的一部分清楚地表明,
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
表示/var/cache/debconf/config.dat
已被另一个进程锁定,从而阻止当前进程配置包。因此请等待该进程释放/var/cache/debconf/config.dat
此资源。如果没有其他进程正在使用此资源,只需重新启动即可解决您的问题。