【美高梅手机版4858】Linux常见错误之Could

By admin in 美高梅手机版4858 on 2019年5月3日

在Ubuntu系统上安装vim是遭逢的标题:

Linux常见错误之Could not get lock /var/lib/dpkg/lock,lockdpkg

【美高梅手机版4858】Linux常见错误之Could。在Ubuntu系统上设置vim是碰见的标题:

[email protected]:/# vim
The 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 vim
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?
root@ubuntu:/# 

并发这么些难题恐怕是有别的2个程序正在运转,导致财富被锁不可用。而致使财富被锁的缘由可能是上次运转安装或更新时从没例行完结,进而出现此现象,化解的措施其实很简短:

在顶峰输入以下两句发号施令:

[email protected]:/# sudo rm /var/cache/apt/archives/lock
[email protected]:/# sudo rm /var/lib/dpkg/lock

履行之后就可以再一次安装vim文本编辑器了。

 

not get lock
/var/lib/dpkg/lock,lockdpkg 在Ubuntu系统上设置vim是遭受的标题:
[email protected]:/
# vim The program ‘vim’ can be found in the foll…

美高梅手机版4858 ,用apt-get命令安装一些软件包时,总报错:E:could not get lock
/var/lib/dpkg/lock -open等

root@ubuntu:/# vim
The 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 vim
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?
root@ubuntu:/# 

并发这几个主题材料的原委或然是有别的二个先后正在周转,导致能源被锁不可用。而导致能源被锁的缘由,大概是上次安装时没符合规律完结,而招致现身此情景。

现身这几个难题恐怕是有此外叁个主次正在周转,导致财富被锁不可用。而导致能源被锁的原故大概是上次运作安装或更新时从没健康落成,进而出现此情景,消除的法门其实很简短:

消除措施:输入以下命令,删除相应的不二等秘书技就能够

在巅峰输入以下两句发号施令:

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

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

sudo rm /var/lib/dpkg/lock

实行之后就能够再度安装vim文本编辑器了。

然后再安装想装的包,就能够缓慢解决。

 

发表评论

电子邮件地址不会被公开。 必填项已用*标注

网站地图xml地图
Copyright @ 2010-2019 美高梅手机版4858 版权所有