最近我刚刚设置了一个 Ubuntu 15.10 系统,并且正在下载一些东西。系统提示我更新一些东西,我接受了,当我在 Firefox 中浏览一些东西时,它就开始运行了。我正在运行一个 sudo 命令,这个命令是我在搜索可以摆脱 Intel Haswell Mobile 驱动程序并获取我的 Windows 10 系统所具有的 Intel HD Graphics 4000 驱动程序时发现的。(Windows 与这种情况无关,我只想要正确的驱动程序,而不是将我的 fps 限制为 60 并出现故障的驱动程序。)但是当我尝试这样做时,软件更新对话框变成了代表无响应的黑色暗色,我单击了 X。它询问我是否要等待它响应或强制退出,几分钟后我强制退出。然后,就像它真的更新了一样,我去了软件中心获取一些我需要的应用程序。我开始安装 Synaptic 软件包管理器以获取一些未安装的更新以及可能的驱动程序的更新,但随后它显示了一个标题为的对话框,Package operation failed
并说The installation or removal of a software package failed
。然后我尝试安装 GIMP,它说了同样的事情。以下是我尝试安装 Synaptic 软件包管理器时的详细信息。
installArchives() failed: debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
Selecting previously unselected package synaptic.
(Reading database ...
(Reading database ... 5%
(Reading database ... 10%
(Reading database ... 15%
(Reading database ... 20%
(Reading database ... 25%
(Reading database ... 30%
(Reading database ... 35%
(Reading database ... 40%
(Reading database ... 45%
(Reading database ... 50%
(Reading database ... 55%
(Reading database ... 60%
(Reading database ... 65%
(Reading database ... 70%
(Reading database ... 75%
(Reading database ... 80%
(Reading database ... 85%
(Reading database ... 90%
(Reading database ... 95%
(Reading database ... 100%
(Reading database ... 212718 files and directories currently installed.)
Preparing to unpack .../synaptic_0.81.4build2_amd64.deb ...
Unpacking synaptic (0.81.4build2) ...
Processing triggers for hicolor-icon-theme (0.15-0ubuntu1) ...
Processing triggers for man-db (2.7.4-1) ...
Processing triggers for gnome-menus (3.13.3-6ubuntu1) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu3) ...
Processing triggers for bamfdaemon (0.5.2~bzr0+15.10.20150627.1-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for mime-support (3.58ubuntu1) ...
Setting up cups (2.1.0-4ubuntu3) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing package cups (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up grub-pc (2.02~beta2-29ubuntu0.3) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing package grub-pc (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up unattended-upgrades (0.86.2ubuntu1.1) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing package unattended-upgrades (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of python3-software-properties:
python3-software-properties depends on unattended-upgrades; however:
Package unattended-upgrades is not configured yet.
dpkg: error processing package python3-software-properties (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of software-properties-common:
software-properties-common depends on python3-software-properties (= 0.96.13.1); however:
Package python3-software-properties is not configured yet.
dpkg: error processing package software-properties-common (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of software-properties-gtk:
software-properties-gtk depends on python3-software-properties (= 0.96.13.1); however:
Package python3-software-properties is not configured yet.
software-properties-gtk depends on software-properties-common; however:
Package software-properties-common is not configured yet.
dpkg: error processing package software-properties-gtk No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
(--configure):
dependency problems - leaving unconfigured
Setting up synaptic (0.81.4build2) ...
Errors were encountered while processing:
cups
grub-pc
unattended-upgrades
python3-software-properties
software-properties-common
software-properties-gtk
Error in function:
Setting up grub-pc (2.02~beta2-29ubuntu0.3) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing package grub-pc (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up cups (2.1.0-4ubuntu3) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing package cups (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up unattended-upgrades (0.86.2ubuntu1.1) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing package unattended-upgrades (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of python3-software-properties:
python3-software-properties depends on unattended-upgrades; however:
Package unattended-upgrades is not configured yet.
dpkg: error processing package python3-software-properties (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of software-properties-common:
software-properties-common depends on python3-software-properties (= 0.96.13.1); however:
Package python3-software-properties is not configured yet.
dpkg: error processing package software-properties-common (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of software-properties-gtk:
software-properties-gtk depends on python3-software-properties (= 0.96.13.1); however:
Package python3-software-properties is not configured yet.
software-properties-gtk depends on software-properties-common; however:
Package software-properties-common is not configured yet.
dpkg: error processing package software-properties-gtk (--configure):
dependency problems - leaving unconfigured
在有人将此标记为重复之前,我尝试搜索一些修复程序,有人说删除某些系统路径中的某些文件,然后 sudo update,但它们是只读文件。然后有一个解决方案希望我通过 sudo apt-get install 命令安装某些东西,但无论我尝试安装什么包/应用程序,最后一行总是会这样说:
E: Sub-process /usr/bin/dpkg returned an error code (1)
在看了一些包含一些我完全不明白的废话的修复后,我放弃了。我对 Ubuntu 几乎一无所知,而且我已经 2-3 年没碰过 Ubuntu 了
答案1
重新启动
打开终端然后执行
sudo su
dpkg --configure -a
apt-get -f install
apt-get autoremove
apt-get autoclean
apt-get update
apt-get upgrade
apt-get install software-properties-common
apt-get install software-properties-gtk
祝您使用 Ubuntu 愉快