Results 1 to 5 of 5

Thread: Could not get lock during upgrade

  1. #1
    Join Date
    Jan 2013
    Beans
    62

    Question Could not get lock during upgrade

    Hi all,

    I tried to upgrade

    # sudo apt-get upgrade

    Got error:

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

    How do I deal with that?

  2. #2
    Join Date
    Nov 2006
    Location
    The green
    Beans
    Hidden!
    Distro
    Kubuntu 12.10 Quantal Quetzal

    Re: Could not get lock during upgrade

    This command should kill any programs locking the cache and remove the lock
    Code:
    sudo fuser -cuk /var/cache/apt/archives/lock
    sudo rm -f /var/cache/apt/archives/lock
    However, you should be careful that you don't interupt any ongoing installations as this might create an unstable system.

  3. #3
    Join Date
    Jun 2012
    Beans
    13

    Re: Could not get lock during upgrade

    If I have something upgrading in the cli and its waiting for conformation to proceed, and I try to use packagemgr I'll get the same" can not get lock" until I complete the cli command.

  4. #4
    Join Date
    Sep 2012
    Location
    Gnome12o4/LXQt14o4
    Beans
    Hidden!

    Re: Could not get lock during upgrade

    You cannot apt-get and use another package manager at the same time.

  5. #5
    Join Date
    Jun 2010
    Location
    London, England
    Beans
    6,396
    Distro
    Ubuntu Development Release

    Re: Could not get lock during upgrade

    We can not use more than one method of updating at the same time. If Update Manager then it will lock out any other attempts to update/upgrade. The same applies to any method that we use to update/upgrade. This includes the terminal, the software Centre, and other package managers such as Synaptic.

    Remember, Update Manager checks for updates in the background according to a schedule that is fixed by its settings. If we are trying to update through the terminal when Update Manager is making its connections to the repositories, then we get that cannot lock on message.

    Regards.
    It is a machine. It is more stupid than we are. It will not stop us from doing stupid things.
    Ubuntu user #33,200. Linux user #530,530


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •