1

I am beginner to Ubuntu OS. Yesterday I have successfully installed 16.04 version.

Today I was trying to install "ttf-mscorefonts-installer", I was getting continuously error message:

E: Could not get lock /var/cache/apt/archives/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/cache/apt/archives/

So I have removed lock file and tried to re-configured. Somewhere I did mistake, not getting how to resolve it.

root@guest-To-be-filled-by-O-E-M:/# sudo apt-get install --reinstall ttf-mscorefonts-installer
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?
root@guest-To-be-filled-by-O-E-M:/# sudo rm /var/lib/apt/lists/lock
root@guest-To-be-filled-by-O-E-M:/# sudo rm /var/cache/apt/archives/lock
root@guest-To-be-filled-by-O-E-M:/# sudo rm /var/lib/dpkg/lock
root@guest-To-be-filled-by-O-E-M:/# dpkg --configure -a
root@guest-To-be-filled-by-O-E-M:/# sudo dpkg --configure -a
root@guest-To-be-filled-by-O-E-M:/# sudo apt-get clean
E: Could not get lock /var/cache/apt/archives/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/cache/apt/archives/
root@guest-To-be-filled-by-O-E-M:/# sudo rm /var/cache/apt/archives/lock
root@guest-To-be-filled-by-O-E-M:/# sudo apt-get clean
root@guest-To-be-filled-by-O-E-M:/# sudo apt-get install --reinstall ttf-mscorefonts-installer
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 18 not upgraded.
1 not fully installed or removed.
Need to get 29.5 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://in.archive.ubuntu.com/ubuntu xenial/multiverse amd64 ttf-mscorefonts-installer all 3.4+nmu1ubuntu2 [29.5 kB]
Fetched 29.5 kB in 0s (66.9 kB/s)                    
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
(Reading database ... 212382 files and directories currently installed.)
Preparing to unpack .../ttf-mscorefonts-installer_3.4+nmu1ubuntu2_all.deb ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing archive /var/cache/apt/archives/ttf-mscorefonts-installer_3.4+nmu1ubuntu2_all.deb (--unpack):
 subprocess new pre-installation script returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/ttf-mscorefonts-installer_3.4+nmu1ubuntu2_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@guest-To-be-filled-by-O-E-M:/# sudo rm /var/lib/dpkg/lock
root@guest-To-be-filled-by-O-E-M:/# sudo apt-get install --reinstall ttf-mscorefonts-installer
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 18 not upgraded.
1 not fully installed or removed.
Need to get 0 B/29.5 kB of archives.
After this operation, 0 B of additional disk space will be used.
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
(Reading database ... 212382 files and directories currently installed.)
Preparing to unpack .../ttf-mscorefonts-installer_3.4+nmu1ubuntu2_all.deb ...
debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable
dpkg: error processing archive /var/cache/apt/archives/ttf-mscorefonts-installer_3.4+nmu1ubuntu2_all.deb (--unpack):
 subprocess new pre-installation script returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/ttf-mscorefonts-installer_3.4+nmu1ubuntu2_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@guest-To-be-filled-by-O-E-M:/# sudo apt-get update && sudo apt-get upgrade
Get:1 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB]
Hit:2 http://in.archive.ubuntu.com/ubuntu xenial InRelease
Get:3 http://in.archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB]    
Get:4 http://security.ubuntu.com/ubuntu xenial-security/main amd64 DEP-11 Metadata [68.0 kB]
Get:5 http://in.archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB]  
Get:6 http://security.ubuntu.com/ubuntu xenial-security/main DEP-11 64x64 Icons [41.4 kB]
Get:7 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 DEP-11 Metadata [32.1 kB]
Get:8 http://security.ubuntu.com/ubuntu xenial-security/universe DEP-11 64x64 Icons [37.0 kB]
Get:9 http://in.archive.ubuntu.com/ubuntu xenial-updates/main amd64 DEP-11 Metadata [306 kB]
Get:10 http://in.archive.ubuntu.com/ubuntu xenial-updates/main DEP-11 64x64 Icons [181 kB]
Get:11 http://in.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 DEP-11 Metadata [134 kB]
Get:12 http://in.archive.ubuntu.com/ubuntu xenial-updates/universe DEP-11 64x64 Icons [162 kB]
Get:13 http://in.archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 DEP-11 Metadata [2,516 B]
Get:14 http://in.archive.ubuntu.com/ubuntu xenial-backports/main amd64 DEP-11 Metadata [3,328 B]
Fetched 1,273 kB in 3s (364 kB/s)                                           
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?
root@guest-To-be-filled-by-O-E-M:/# sudo dpkg --configure -adpkg: error: dpkg status database is locked by another process
root@guest-To-be-filled-by-O-E-M:/# sudo dpkg --configure -a
dpkg: error: dpkg status database is locked by another process
root@guest-To-be-filled-by-O-E-M:/# sudo apt-get install -f
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?
root@guest-To-be-filled-by-O-E-M:/# lsof /var/lib/dpkg/lock
lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1001/gvfs
      Output information may be incomplete.
COMMAND   PID USER   FD   TYPE DEVICE SIZE/OFF     NODE NAME
synaptic 4350 root   11uW  REG    8,2        0 14155947 /var/lib/dpkg/lock
root@guest-To-be-filled-by-O-E-M:/# lsof /var/lib/dpkg/lock
lsof: WARNING: can't stat() fuse.gvfsd-fuse file system /run/user/1001/gvfs
      Output information may be incomplete.
root@guest-To-be-filled-by-O-E-M:/# ps cax | grep PID
  PID TTY      STAT   TIME COMMAND
root@guest-To-be-filled-by-O-E-M:/# kill PID
bash: kill: PID: arguments must be process or job IDs
root@guest-To-be-filled-by-O-E-M:/# #wait
root@guest-To-be-filled-by-O-E-M:/# kill -9 PID
bash: kill: PID: arguments must be process or job IDs
root@guest-To-be-filled-by-O-E-M:/# ps cax | grep PID
  PID TTY      STAT   TIME COMMAND
root@guest-To-be-filled-by-O-E-M:/# sudo rm /var/lib/dpkg/lock
root@guest-To-be-filled-by-O-E-M:/# sudo dpkg --configure -a
root@guest-To-be-filled-by-O-E-M:/# sudo apt-get install -f
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  ttf-mscorefonts-installer
0 upgraded, 0 newly installed, 1 to remove and 18 not upgraded.
1 not fully installed or removed.
After this operation, 134 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 ... 212381 files and directories currently installed.)
Removing ttf-mscorefonts-installer (3.4+nmu1ubuntu2) ...
Processing triggers for update-notifier-common (3.168.3) ...
root@guest-To-be-filled-by-O-E-M:/#

Now I am getting error for 16.04 internal error message. P.F.A. enter image description here enter image description here

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.