0

My computer crashed during the upgrade from 14.04 to 16.04 and since then I receive this message when I get to the command line.This is the command I used for the upgrade

sudo update-manager -d

How can I resolve this?

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?
Zanna
  • 70,465
YaGi
  • 11
  • Have you tried --do-release-upgrade? That is the preferred method. I know -d checks first, but I haven't executed one that way; maybe it ends up the same. As for your admin directory being locked... you should be able to restart to fix that. If you're feeling wild, try pkill -KILL -u root which will kill all root processes. Then you'll more than likely have to restart anyway, but I wouldn't delete the lock file.. – P Smith Jun 15 '16 at 15:52
  • I am using 16.04 and have had a few issues, too, but they are getting hammered out really quickly thanks to AskUbuntu. Just stick with it. It's a great release. Another thought is that if your package manager is open (GUI version, Synaptic, whatever you use), then that would lock your admin directory too. Check ps root processes. – P Smith Jun 15 '16 at 15:55

2 Answers2

0

This might be frowned upon, but you could try deleting the lock file... then re-attempting the upgrade:

sudo rm /var/lib/dpkg/lock
drew
  • 21
0

you can delete the lock file with the following command:

sudo rm /var/lib/apt/lists/lock

You may also need to delete the lock file in the cache directory

sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock

After that, try opening Synaptic again.

Zanna
  • 70,465