我无法在 Ubuntu 16.04 中安装 Gnome

我无法在 Ubuntu 16.04 中安装 Gnome

当我尝试通过终端安装 Gnome 时出现如下内容:

ansh@Ansh-HP-Notebook:~$ sudo apt update
[sudo] password for ansh:

E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/lib/apt/lists/
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?

ansh@Ansh-HP-Notebook:~$ sudo apt install ubuntu-gnome-desktop

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

这应该作为最后的手段。如果你不小心使用,最终可能会导致系统崩溃

去除lock

sudo rm  /var/lib/dpkg/lock

配置dpkg

sudo dpkg --configure -a

更新你的 apt-get :

sudo apt-get update --fix-missing

相关内容