When using the installation command sudo apt-Get install XXX on the Ubuntu terminal, the error "E: cannot obtain the lock/var/lib/dpkg/lock-open (11: Temporarily unavailable resources)" always appears.

Source: Internet
Author: User

When using the installation command sudo apt-Get install XXX on the Ubuntu terminal, the following error may occur:

Input: APT-Get install Vim
The following figure is displayed:
E: unable to obtain the lock/var/lib/dpkg/lock-open (11: The resource is temporarily unavailable)
E: The management directory (/var/lib/dpkg/) cannot be locked. Is there any other process occupying it?


Refer to UbuntuCommunityA post and a Sina Blog finally solved the problem. The URL is a post in the Ubuntu community.And a Sina Blog


Solution 1: Check whether there are two Apt

Force unlock, and enter the command in the terminal

Sudo RM/var/Cache/APT/archives/lock

Sudo RM/var/lib/dpkg/lock

Solve the problem.

This problem is actually caused by Operation problems. You must have forcibly shut down the terminal (for example, CTRL + Z), so you cannot obtain the exclusive lock due to running, the solution is to develop a good habit. The terminal often uses Ctrl + C to terminate the operation, and the same problem will not occur in the future.


Solution 2: Disable the apt-Get process forcibly terminated by you.

Enter PS-Aux on the terminal to list processes. Find the process P containing apt '-Get or wgetID,
Sudo kill PID directly. Solution.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.