AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 1296774
Accepted
J-6474
J-6474
Asked: 2020-12-02 15:04:52 +0800 CST2020-12-02 15:04:52 +0800 CST 2020-12-02 15:04:52 +0800 CST

无法从 Ubuntu 18.04 tty 重新安装 xfce 或任何 GUI

  • 772

我正在尝试在 TTY 上的 Ubuntu 18.04 上重新安装 xfce 或 xubuntu-desktop,但不幸的是,我错误地删除了我的 GUI 包以及可能更多。我的来源列表目前看起来像:

deb http://ca.archive.ubuntu.com/ubuntu/ bionic universe
deb http://ca.archive.ubuntu.com/ubuntu/ bionic-security main restricted universe multiverse 
deb http://ca.archive.ubuntu.com/ubuntu/ bionic-updates main restricted universe multiverse 
deb http://ca.archive.ubuntu.com/ubuntu/ bionic-proposed main restricted universe multiverse 
deb http://ca.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse

的输出apt policy ubuntu-desktop是

ubuntu-desktop:
Installed: (none)
Candidate: 1.417.5
Versiontable:
1.417.5 500
500 http://ca.archive.ubuntu.com/ubuntu bionic-updates.main amd64 Packages

运行后,sudo apt-get update && sudo apt-get upgrade我尝试安装 xubuntu-desktop,sudo apt-get install xubuntu-desktop它sudo apt-get install xfce4给了我一个依赖项列表,所有这些都说它“不会被安装”。例如:

    The following packages have unmet dependencies:
    xfce4: Depends: xfwm4 (>= 4.12.0) but it is not going to be installed
    ...
E: Unable to correct problems, you have held broken packages.

为了尝试调查这个损坏的包问题,我尝试了:

sudo apt-get install -f && sudo dpkg --configure -a

和

dpkg --get-selections | grep hold

它什么也没返回。我也尝试sudo apt-get install aptitude了一种解决方法,但我得到了:

E: Package 'aptitude' has no installation candidate.

我知道我可以手动安装这些依赖项,sudo apt-get install <unmet dependencies> <unmet dependencies>但我将永远陷入为数百个依赖项执行此操作的循环中。

我是否在源列表中遗漏了某些内容,导致我无法 1) 安装 aptitude 和 xfce 等软件包?2)安装依赖项?我不确定下一步该做什么。

注意:我是 Ubuntu 新手!另外,我确实连接到wifi。

package-management gui dependencies xfce xubuntu
  • 2 2 个回答
  • 307 Views

2 个回答

  • Voted
  1. Best Answer
    guiverc
    2020-12-02T15:47:20+08:002020-12-02T15:47:20+08:00

    看看你的sources.list

    您已经包含多个用于向后移植、安全和更新的存储库,但它们在主要仿生版本中缺失,这意味着如果您删除原始媒体上的软件包,您将无法重新安装它们(除非在“宇宙”中; 例如 aptitude 在“main”中)。

    尝试

    deb http://ca.archive.ubuntu.com/ubuntu/ bionic main restricted universe multiverse
    deb http://ca.archive.ubuntu.com/ubuntu/ bionic-security main restricted universe multiverse 
    deb http://ca.archive.ubuntu.com/ubuntu/ bionic-updates main restricted universe multiverse 
    deb http://ca.archive.ubuntu.com/ubuntu/ bionic-proposed main restricted universe multiverse 
    deb http://ca.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
    

    注意:我使用了您帖子的格式;这不是我的样子。

    关键是您需要在第一行添加“main”,尽管我也会添加“multiverse”和“restricted”

    https://help.ubuntu.com/community/Repositories/Ubuntu

    我认为这不是您唯一的问题;它没有解释 xfwm4

    • 3
  2. mook765
    2020-12-02T15:48:39+08:002020-12-02T15:48:39+08:00

    你sources.list错过了这条线

    deb http://ca.archive.ubuntu.com/ubuntu/ bionic main restricted multiverse
    

    我还看到,您proposed启用了 -repository,通常情况下不应如此。但你可能有你的理由。如有疑问,请禁用proposed-repository。

    • 0

相关问题

  • iptables 的图形用户界面?

  • 有没有办法重置所有包/源并从头开始?

  • 如何回滚到 PHP 5.2?

  • 包管理器之间有什么区别?

  • 从共享 NFS /home 到完整的 LDAP 解决方案

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve