无法安装编解码器(无法获取锁 /var/lib/dpkg/lock)

无法安装编解码器(无法获取锁 /var/lib/dpkg/lock)

我使用本文末尾的命令尝试安装文章推荐的受限附加功能。 http://www.webupd8.org/2013/04/7-things-to-do-after-installing-ubuntu.html

sudo apt-get install ubuntu-restricted-extras

当我在终端输入此命令时,收到以下错误消息:

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?
rick@rick-XPS-L521X:~$ sudo apt-get install ubuntu-restricted-extras
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?
rick@rick-XPS-L521X:~$ sudo apt-get install libavformat-extra-53 libavcodec-extra-53
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?
rick@rick-XPS-L521X:~$ sudo apt-get install ubuntu-restricted-extras
[sudo] password for rick: 
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?

我第一次尝试安装受限制的附加功能时,终端将我带到一个法律批准页面,最后无法同意或不同意条款。所以我退出并尝试再次安装,但随后收到错误消息。我该如何解决这个问题?

答案1

这意味着您已经在运行 apt-get(可以通过软件中心),或者上次锁尚未正确释放。

如果您确定没有正在进行的进程,您可以尝试删除锁定文件。

相关内容