Symptoms
Note: The article is applicable only to Plesk servers with Debian or Ubuntu operating systems.
-
Plesk update fails:
PLESK_ERROR: 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?OR
PLESK_ERROR: E: Could not get lock /var/lib/dpkg/lock-frontend – open (11: Resource temporarily unavailable)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?OR
PLESK_ERROR: ERROR: Failed to lock /var/lib/apt/lists/lock
-
The following error can be found inÂ
/var/log/plesk/install/autoinstaller3.log
:stderr: E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/lib/apt/lists/ -
The same error can appear during the installation of Ruby or any other Plesk component, as well as system packages installation/upgrade.
Cause
The apt-get
, apt
, or aptitude
process is hung or was not terminated properly, therefore, the file /var/lib/dpkg/lock
or /var/lib/dpkg/lock-frontend
was not deleted.
Resolution
Note: if you do not have root access to Plesk via SSH, contact your hosting provider regarding the issue.
Note: If KernelCare is installed on the server, contact Plesk Technical support.
-
Connect to the server using SSH.
-
KillÂ
apt-get
,apt
, oraptitude
processes:-
Execute the following command to get the list of the processes:
# ps auxx | grep ‘[d]pkg|[a]pt’
root 1204 1.6 0.5 43264 5924 pts/1 S+ 17:05 0:00 apt-get update
_apt 1207 0.0 0.2 40288 2900 pts/1 S+ 17:05 0:00 /usr/lib/apt/methods/http -
If any processes are shown, kill them using the below command:
# kill 1204 1207
-
-
Remove the lock files:
# rm -f /var/lib/dpkg/lock*
-
Install Plesk updates:
# plesk installer update