Ubuntu: Unable To Cancel Installation In Software Center (Matlab)



Question:

A Note: This question may be the exact same question as given in How to cancel an installation in the Software Center? but the solutions listed there haven't worked for me.

Question:

I am trying to terminate a software installation from Ubuntu Software Center. I tried installing matlab-support 0.0.17 from the software center:

This package does not provide MATLAB. Instead, it configures an existing MATLAB installation to integrate more comfortably in Debian installation.

However, I didn't have MATLAB installed on my system and accidentally attempted to download matlab-support 0.0.17. As a result, I'm facing the following problem:

Whenever I open Ubuntu Software Center, I notice that there is a process always running. It shows matlab-support 0.0.17 installing...

enter image description here

I look for a way to terminate the installation from the Progress tab to get this:

enter image description here

Once there, I see no way to deselect or terminate the process.

Edit: Output for 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.  

Edit: Output for 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.  

Edit: Output for dpkg -l | grep matlab No output message:

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

Edit: Output for 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)  

Edit: Output for sudo fuser -v /var/cache/debconf/config.dat

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

Edit: Another set of commands with output sudo kill -9 11060 and 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?  

Edit: Output for sudo fuser /var/lib/dpkg/lock (No output message)

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


Solution:1

First we have to find the blocking processes:

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

Sample output

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

and

ps xa | grep apt  

Sample output

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

Kill both processes

sudo kill -9 11060  sudo kill -9 24743  

and your problem is solved.

The matlab-support is not installed, as you have identified with this command

dpkg -l | grep matlab  


Solution:2

I had the excact same problem with gparted. But, I saw back on the How to cancel an installation in the Software Center? question this:

pkill -15 dpkg  

It worked for me, and I hope it works for you, if you have not already solved the problem.

:D


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »