如何重新安装 ubuntu 18.10 默认桌面

如何重新安装 ubuntu 18.10 默认桌面

由于未知原因,我的 ubuntu 桌面消失了,我尝试通过以下命令重新安装它:

sudo apt-get install ubuntu-gnome-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-gnome-desktop : Depends: ubuntu-desktop but it is not going to be installed
                        Depends: gnome-session but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

我已经在 Google 上搜索了我的问题并应用了一些建议的解决方案,但问题仍然存在。

我已删除所有 ppa 包。尝试修复损坏的包等

我想要的只是重新安装我的 ubuntu 桌面并修复系统上安装的软件包。

的输出cat /etc/apt/sources.list是:

# deb cdrom:[Ubuntu 18.10 _Cosmic Cuttlefish_ - Release amd64 (20181017.3)]/ cosmic main restricted

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://ubuntu.hostiran.ir/ubuntuarchive/ cosmic main restricted
# deb-src http://ir.archive.ubuntu.com/ubuntu/ cosmic main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://ubuntu.hostiran.ir/ubuntuarchive/ cosmic-updates main restricted
# deb-src http://ir.archive.ubuntu.com/ubuntu/ cosmic-updates main restricted

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://ubuntu.hostiran.ir/ubuntuarchive/ cosmic universe
# deb-src http://ir.archive.ubuntu.com/ubuntu/ cosmic universe
deb http://ubuntu.hostiran.ir/ubuntuarchive/ cosmic-updates universe
# deb-src http://ir.archive.ubuntu.com/ubuntu/ cosmic-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu 
## team, and may not be under a free licence. Please satisfy yourself as to 
## your rights to use the software. Also, please note that software in 
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://ubuntu.hostiran.ir/ubuntuarchive/ cosmic multiverse
# deb-src http://ir.archive.ubuntu.com/ubuntu/ cosmic multiverse
deb http://ubuntu.hostiran.ir/ubuntuarchive/ cosmic-updates multiverse
# deb-src http://ir.archive.ubuntu.com/ubuntu/ cosmic-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://ubuntu.hostiran.ir/ubuntuarchive/ cosmic-backports main restricted universe multiverse
# deb-src http://ir.archive.ubuntu.com/ubuntu/ cosmic-backports main restricted universe multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu cosmic partner
# deb-src http://archive.canonical.com/ubuntu cosmic partner

deb http://ubuntu.hostiran.ir/ubuntuarchive/ cosmic-security main restricted
# deb-src http://security.ubuntu.com/ubuntu cosmic-security main restricted
deb http://ubuntu.hostiran.ir/ubuntuarchive/ cosmic-security universe
# deb-src http://security.ubuntu.com/ubuntu cosmic-security universe
deb http://ubuntu.hostiran.ir/ubuntuarchive/ cosmic-security multiverse
# deb-src http://security.ubuntu.com/ubuntu cosmic-security multiverse

# This system was installed using small removable media
# (e.g. netinst, live or single CD). The matching "deb cdrom"
# entries were disabled at the end of the installation process.
# For information about how to configure apt package sources,
# see the sources.list(5) manual.
deb [arch=amd64] https://download.docker.com/linux/ubuntu cosmic stable
# deb-src [arch=amd64] https://download.docker.com/linux/ubuntu cosmic stable

顺便说一下这是命令的输出lsb_release -a

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.10
Release:    18.10
Codename:   cosmic

答案1

自 ubuntu 17.10 起默认桌面是 gnome3,不再是 unity。

sudo apt install --reinstall ubuntu-desktop gnome-shell

相关内容