Problem when installing nginx (Could not get lock)

I could not install nginx by using the provided command. I got the following error:
E: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 3345 (unattended-upgr)
N: Be aware that removing the lock file is not a solution and may break your system.
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?

I managed to solve it by following the instructions in this post ([Solved] Could not get lock /var/lib/dpkg/lock Error in Ubuntu )
Using both method 1 and 2 mentioned in the post.
Any better way to handle this?

1 Like

Apparently a friend who also does the course had no problems at all so it might just have been a problem on my side.

Hi @jo4875li-s,

Thank you very much for reporting this.

I’ll try to fix this error by disabling that apt.systemd.daily update.


  • This has been fixed. The apt.systemd.daily service has been disabled.


This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.