无法取消软件中心(Matlab)的安装

无法取消软件中心(Matlab)的安装

一张纸条:这个问题可能与如何在软件中心取消安装?但那里列出的解决方案对我没有用。

问题:

我正在尝试从 Ubuntu 软件中心终止软件安装。我尝试matlab-support 0.0.17从软件中心安装:

此软件包不提供 MATLAB。相反,它配置现有的 MATLAB 安装,以便更舒适地集成到 Debian 安装中。

然而, 我的系统上没有安装 MATLAB并意外尝试下载matlab-support 0.0.17。结果,我面临以下问题:

每当我打开 Ubuntu 软件中心时,我都会注意到有一个进程一直在运行。它显示 matlab-support 0.0.17 正在安装...

在此处输入图片描述

我寻找一种方法来终止安装进步标签来获得这个:

在此处输入图片描述

一旦到达那里,我看不到取消选择或终止该过程的方法。

编辑:输出sudo apt-get install -f

Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 12 not upgraded.

编辑:输出sudo apt-get upgrade

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages have been kept back:
  dpkg-dev libatlas3gf-base libblas-dev libblas3gf libdpkg-perl liblapack-dev liblapack3gf linux-headers-generic-lts-quantal
  linux-image-generic-lts-quantal r-base-dev r8168-dkms texinfo
0 upgraded, 0 newly installed, 0 to remove and 12 not upgraded.

编辑:无输出消息的输出dpkg -l | grep matlab

anirudh@anirudh-Vostro-3445:~$ dpkg -l | grep matlab
anirudh@anirudh-Vostro-3445:~$ 

编辑:输出sudo apt-get install matlab-support

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  matlab-support
0 upgraded, 1 newly installed, 0 to remove and 12 not upgraded.
Need to get 0 B/27.9 kB of archives.
After this operation, 165 kB of additional disk space will be used.
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
Selecting previously unselected package matlab-support.
(Reading database ... 187961 files and directories currently installed.)
Unpacking matlab-support (from .../matlab-support_0.0.17_all.deb) ...
Processing triggers for bamfdaemon ...
Rebuilding /usr/share/applications/bamf.index...
Processing triggers for desktop-file-utils ...
Processing triggers for gnome-menus ...
Processing triggers for hicolor-icon-theme ...
Processing triggers for man-db ...
Setting up matlab-support (0.0.17) ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing matlab-support (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 matlab-support
E: Sub-process /usr/bin/dpkg returned an error code (1)

编辑:输出sudo fuser -v /var/cache/debconf/config.dat

                     USER        PID ACCESS COMMAND
/var/cache/debconf/config.dat:
                     root      11060 F.... dpkg-preconfigu

编辑:另一组带有输出sudo kill -9 11060和的命令sudo apt-get install matlab-support

anirudh@anirudh-Vostro-3445:~$ sudo kill -9 11060
anirudh@anirudh-Vostro-3445:~$ sudo apt-get install matlab-support
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

编辑:输出sudo fuser /var/lib/dpkg/lock(无输出消息)

anirudh@anirudh-Vostro-3445:~$ sudo fuser /var/lib/dpkg/lock
[sudo] password for anirudh: 
anirudh@anirudh-Vostro-3445:~$

答案1

首先我们必须找到阻塞进程:

sudo fuser -v /var/cache/debconf/config.dat

示例输出

USER        PID ACCESS COMMAND
/var/cache/debconf/config.dat:
root      11060 F.... dpkg-preconfig

ps xa | grep apt

示例输出

24743 ? S 0:00 /usr/bin/python /usr/share/apt-xapian-index/update-apt-xapian-index-dbus

终止两个进程

sudo kill -9 11060
sudo kill -9 24743

您的问题就解决了。

尚未matlab-support安装,因为您已使用此命令识别

dpkg -l | grep matlab

答案2

我在使用 gparted 时遇到了完全相同的问题。但是,我在“如何在软件中心取消安装?”中看到了这个问题:

pkill -15 dpkg

它对我有用,如果您尚未解决问题,我希望它对您也有用。

:D

相关内容