使用 aptitude 安装 ubuntu-desktop 后无法移动或调整窗口大小

使用 aptitude 安装 ubuntu-desktop 后无法移动或调整窗口大小

我有 Ubuntu 16.04:

root@ubuntu:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 16.04.5 LTS
Release:    16.04
Codename:   xenial

root@ubuntu:~# uname -a
Linux ubuntu 4.15.0-45-generic #48~16.04.1-Ubuntu SMP Tue Jan 29 18:03:48 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

我遇到了无法加载 GUI 桌面的问题,所以我已安装它与aptitude

aptitude install ubuntu-desktop 

但是在加载 GUI 之后,只剩下桌面,没有栏和所有菜单,并且我无法移动\调整窗口大小。 在此处输入图片描述

我尝试重新安装ubuntu-desktopapt-get失败了:

root@ubuntu:~# apt-get install --reinstall ubuntu-desktop
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 ubuntu-desktop : Depends: unity but it is not going to be installed
                  Recommends: network-manager-gnome but it is not going to be installed
                  Recommends: snapd but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

当前安装的版本:

root@ubuntu:~# apt-cache policy ubuntu-desktop
ubuntu-desktop:
  Installed: (none)
  Candidate: 1.361
  Version table:
     1.361 500
        500 http://us.archive.ubuntu.com/ubuntu xenial/main amd64 Packages

答案1

/etc/apt/source.list通过以下方式恢复了文件回答。

这是我的情况中的 source.list:

#------------------------------------------------------------------------------#
#                            OFFICIAL UBUNTU REPOS                             #
#------------------------------------------------------------------------------#

###### Ubuntu Main Repos
deb http://il.archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse 
deb-src http://il.archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse 

###### Ubuntu Update Repos
deb http://il.archive.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse 
deb http://il.archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse 
deb-src http://il.archive.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse 
deb-src http://il.archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse 

###### Ubuntu Partner Repo
deb http://archive.canonical.com/ubuntu xenial partner
deb-src http://archive.canonical.com/ubuntu xenial partner

deb http://us.archive.ubuntu.com/ubuntu/ xenial main universe restricted multiverse
deb http://security.ubuntu.com/ubuntu/ xenial-security multiverse universe restricted main
deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates multiverse universe restricted main

运行后,apt-get update我可以运行apt-get install --reinstall ubuntu-desktop,然后重新启动机器。
现在一切恢复正常。

相关内容