I accidentally deleted tmp folder. than I was unable to visit browser neither could update/upgrade from terminal. I somehow managed to give 777 permissions to tmp. but When running sudo apt-get upgrade. producing following error.  Processing triggers for libc-bin (2.19-0ubuntu6.6) ... Processing triggers for libreoffice-common (1:4.2.8-0ubuntu3) ... E: Could not get lock /var/cache/apt/archives/lock - open (11: Resource temporarily unavailable) E: Unable to lock the download directory E: Problem executing scripts DPkg::Post-Invoke 'apt-get clean' E: Sub-process returned an error code
3087
I get this error when trying to use apt-get:  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?     How can I fix this?
44441
I accidently removed apt-get from my Debian system by issuing:  dpkg --force-depends --purge apt   How can I reinstall it?
38992
My synaptic package manager in ubuntu is giving error:    Unable to get exclusive lock   This usually means that another package management application(like apt-get or     aptitude) is already running. Please close that application first.
114581
I have recently upgraded my OS to Ubuntu 18.04 (fresh install via boot device). However, when trying the command:  sudo apt-get upgrade   It works fine until ~75% when it stops and says:  snapd.snap-repair.service is a disabled or a static unit, not starting it.   I'm not quite sure what this means and if I Crtl-Z to get out of it, any time I try to install anything I get:  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?   and have to restart my computer to install anything.
45286
Strange thing I have here, when apt is locked by something. Respectively, the error codes don't match up. apt update seems to always return success 0, whereas apt-get update returns a proper error code.  vlastimil@vb-nb-mint ~/Development/bash $ sudo apt-get update Reading package lists... Done E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable) E: Unable to lock directory /var/lib/apt/lists/  vlastimil@vb-nb-mint ~/Development/bash $ echo $? 100  vlastimil@vb-nb-mint ~/Development/bash $ sudo apt update Reading package lists... Done E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable) E: Unable to lock directory /var/lib/apt/lists/  vlastimil@vb-nb-mint ~/Development/bash $ echo $? 0   apt's location:  vlastimil@vb-nb-mint ~/Development/bash $ which apt /usr/local/bin/apt   apt's version:  vlastimil@vb-nb-mint ~/Development/bash $ apt-show-versions apt apt:amd64/xenial-updates 1.2.12~ubuntu16.04.1 uptodate   I originally wanted to use apt for the manual upgrade script, but this changes the situation. Does someone understand error codes and such in order to help me with this?
68758
I am getting error while using sudo apt-get upgrade stating:  dpkg: error processing libgfortran3:amd64 (--configure):   package libgfortran3:amd64 is not ready for configuration   cannot configure (current status `half-installed') Errors were encountered while processing:   libgfortran3:amd64 E: Sub-process /usr/bin/dpkg returned an error code (1)   It does not seem to block the installation/upgrade other applications. I believe this problem arose due to direct shutting down of my PC while the application was being upgraded.  How can I fix this?
75536
This is the terminal message I keep getting when trying to update via: sudo apt-get update  $ sudo apt-get update [sudo] password for petros: Reading package lists... Done E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable) E: Unable to lock directory /var/lib/apt/lists/   How can I solve it?
83351
Version: Ubuntu 16.04  I have used it some weeks, but now it gives me this message when I'm trying to install software and update or upgrade:  Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable) /var/lib/apt/lists/ locked   followed by this:    .  and another error:  ** (appstreamcli:4560): WARNING **: Exception: Unable to get write lock on /var/cache/app-info/xapian/default: already locked   What should I do?
34338
I just installed Ubuntu (12.04.4) and I upgraded to 13.10  I have no idea how to fix this :/  $ sudo apt-get install -f  Reading package lists... Done Building dependency tree        Reading state information... Done The following packages will be REMOVED:   xserver-common-lts-saucy 0 upgraded, 0 newly installed, 1 to remove and 2 not upgraded. 1 not fully installed or removed. After this operation, 1,718 kB disk space will be freed. Do you want to continue [Y/n]? y (Reading database ... 175174 files and directories currently installed.) Removing xserver-common-lts-saucy ... Removing 'diversion of /usr/lib/xorg/protocol.txt to /usr/lib/xorg/protocol-precise.txt by xserver-common-lts-saucy' dpkg-divert: error: rename involves overwriting `/usr/lib/xorg/protocol.txt' with   different file `/usr/lib/xorg/protocol-precise.txt', not allowed dpkg: error processing xserver-common-lts-saucy (--remove):  subprocess installed post-removal script returned error exit status 2 Errors were encountered while processing:  xserver-common-lts-saucy E: Sub-process /usr/bin/dpkg returned an error code (1)
2675
After installing Ubuntu 12.04 (clean install) I fetch a bunch of program via synaptic (installed specially), all programs worked except Gimp 2.8. So I tried purging Gimp, install again (no luck). Checked broken packages and reinstalled them. When using the Software center I get this MSG:  Failed to fetch http://is.archive.ubuntu.com/ubuntu/pool/main/o/openexr/libopenexr6_1.6.1-4.1_amd64.deb Size mismatch   Tried also this:  sudo apt-get purge gimp* sudo add-apt-repository ppa:otto-kesselgulasch/gimp sudo apt-get update sudo apt-get install gimp   And get this MSG:  Failed to fetch http://is.archive.ubuntu.com/ubuntu/pool/main/o/openexr/libopenexr6_1.6.1-4.1_amd64.deb  Size mismatch E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?   I am wondering if the Icelandic Archive has an outdated version or something?   would really like to install Gimp 2.8 but Gimp 2.6 is OK to.   I am also wondering if I am doing something wrong?
20346
So I'm just coming back to Ubuntu after some time away, running 14.04 and I've gotten things customized the way I like them, more or less.  At one point I'd attempted to download "Popcorn-Time."  I ran into some issues of some sort and decided to remove it/that it wasn't worth the trouble.    Something from the install process seems to be "stuck" in apt-get though.  I'm having issues getting new packages and I'm getting this message:  Processing triggers for man-db (2.6.7.1-1ubuntu1) ... Setting up popcorn-time (0.3.2~webupd8~6) ... Downloading Popcorn Time... --2015-09-06 11:25:00--  http://cdn.popcorntime.io/build/Popcorn-Time ... Resolving cdn.popcorntime.io ... Connecting to cdn.popcorntime.io (cdn.popcorntime.io)|45.33.69.37|:80... connected. HTTP request sent, awaiting response... 404 Not Found 2015-09-06 11:25:00 ERROR 404: Not Found.  download failed Popcorn Time is NOT installed. dpkg: error processing package popcorn-time (--configure):  subprocess installed post-installation script returned error exit status 1 ...  Errors were encountered while processing:  popcorn-time E: Sub-process /usr/bin/dpkg returned an error code (1)   I've omitted a couple of lines there, but I think you get the idea.  This is occurring when I try to install most packages using apt-get, maybe all packages.  It seems like it's interfering, and frankly I'd like it to not try to install popcorn time every time I install any package.  Any ideas?
43454
When I run sudo apt update in Ubuntu 18.10 I get this error message:  E: flAbsPath on /var/lib/dpkg/status failed - realpath (2: No such file or directory) E: Could not open file  - open (2: No such file or directory) E: Problem opening  E: The package lists or status file could not be parsed or opened.   After running sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status it's showing this error message:   cp: cannot stat '/var/lib/dpkg/status-old': No such file or directory
96856
I'm on an old Ubuntu version (Ubuntu 6.06.2 LTS Server) which isn't really supported any more. So the automatic updates don't work. I have ISPConfig installed to manage a few web sites.  What's the best course of action? I'd like to upgrade to something current, but I can't figure out how to go about doing this, given that the apt-get scripts don't really work any longer.
2558
When I try to sudo apt-get upgrade I get:  Preconfiguring packages ... dpkg: error: unable to create new file '/var/lib/dpkg/info/format-new': No such file or directory E: Sub-process /usr/bin/dpkg returned an error code (2)   What should I do to fix it?
114855
I tried to install jdk/jre:  ben@ubuntu:~$ sudo apt-get install openjdk-7-jre-headless   However, I got this message:   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?   I cannot get git to install either, so I don't think it is a problem with the specific package I selected. What that error means, and how to deal with it?
40067
I am running a Linux instance on ec2, snap sorting of image is disabled.  While trying to un-install open-jdk from the system. I stupidly run the command  sudo apt-get remove open*   It started removing many packages, so I stopped the process by Ctrl+C.  I did it twice:   sudo apt-get remove open* sudo apt-get remove openjdk*   I stopped the process (Ctrl+C) in between for both of them.  Now I see that my other application are not working, because of the packages removed.  Please advice, how can I go back to the state before apt-get remove.  Thanks in advance.
107115
Yesterday I had some problem with /var/lib/dpkg/lock during update. I knew that in such cases removing lock file could solve problem. So I tried to do it, but by mistake I removed all DPKG directory. So now I cannot do any update, install, upgrade and so on.  I try via Software Center, Terminal, Qapt, Synaptic. None of these work because all of them do such operations via dpkg. And as my dpkg is corrupted, so I have problem.   How can I completely restore DPKG? I have downloaded dpkg_1.16.1.2ubuntu7_amd64.deb (I use 64bit Ubuntu 12.04) file, but what to do with it in terminal? Simple double-clicking on .deb opens Software Center and you already know, it doesn't work.  P.S. Terminal gives such error:   dpkg: error: cannot read info directory: No such file or directory E: Sub-process /usr/bin/dpkg returned an error code (2)