Unable to get lock/var/lib/dpkg/lock-open (11: Resource temporarily unavailable) Ubuntu installation vim and error handling encountered

Source: Internet
Author: User
Tags gtk

Today, after dealing with the problem, you have nothing to do, and intend to practice shell scripting in Ubuntu in the virtual machine.

Helpless, virtual machine system installed only VI, this editing software for us or is not accustomed to, so intends to install vim. All right, gossip a little.

Install Vim:

1. I am the virtual machine system to avoid trouble, directly switch the root user. Input: Apt-get install VIM-GTK command can be installed, if not the root user, add sudo in front of the command, namely: sudo apt-get install VIM-GTK can be installed Vim tool.

2. However, the installation of the time to report a mistake, the error content is as follows:

E: Unable to get lock/var/lib/dpkg/lock-open (11: Resource temporarily unavailable)
E: Unable to lock the management directory (/var/lib/dpkg/), is there any other process that is consuming it?

Check a lot of information, the hint is also very clear, the reason may be the last time I directly in the VM cut off the power source has been occupied has not been released, so still should pay attention to standardize operations, develop good habits, even if the virtual machine is also the case.

Workaround: I'm using a direct kill-taking process.

The command is as follows:

sudo rm/var/cache/apt/archives/locksudo rm/var/lib/dpkg/lock also removes the sudo keyword if it is the root user.

Unable to get lock/var/lib/dpkg/lock-open (11: Resource temporarily unavailable) Ubuntu installation vim and error handling encountered

Related Article

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.