Home  >  Article  >  Operation and Maintenance  >  Sharing of common Linux errors and solutions

Sharing of common Linux errors and solutions

零下一度
零下一度Original
2017-06-25 10:10:142135browse

I encountered a problem when installing vim on the Ubuntu system:

root@ubuntu:/# vimThe program 'vim' can be found in the following packages: * vim * vim-gnome * vim-tiny * vim-athena * vim-athena-py2 * vim-gnome-py2 * vim-gtk * vim-gtk-py2 * vim-gtk3 * vim-gtk3-py2 * vim-nox * vim-nox-py2
Try: apt install <selected package>root@ubuntu:/# apt install vimE: 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?root@ubuntu:/#

This problem may occur because another program is running, causing the resource to be locked and unavailable. The reason why the resources are locked may be that the last installation or update was not completed normally, and this situation occurs. The solution is actually very simple:

Enter the following two commands in the terminal:

root@ubuntu:/# sudo rm /var/cache/apt/archives/lockroot@ubuntu:/# sudo rm /var/lib/dpkg/lock

After execution, you can install the vim text editor again.

The above is the detailed content of Sharing of common Linux errors and solutions. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn