admin管理员组

文章数量:1531487

执行下面命令,备份 apt 安装源:

$ sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak

vim 编辑 sources.list :

$ sudo vim /etc/apt/sources.list `

将 sources.list 中的内容替换如下

注意:这里是Ubuntu 20.04 LTS的,

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:
aptitude : Depends: libcwidget3 but it is not going to be installed                                                                Depends: libncursesw5 (>= 5.6+20070908) but it is not going to be
installed
Depends: libtinfo5 but it is not going to be installed
Recommends: apt-xapian-index but it is not going to be installed
Recommends: libparse-debianchangelog-perl but it is not going to be
installed
E: Unable to correct problems, you have held broken packages. 

我是用源解决了这个问题的

deb http://mirrors.aliyun/ubuntu/ focal main restricted universe multiverse
deb-src http://mirrors.aliyun/ubuntu/ focal main restricted universe multiverse

deb http://mirrors.aliyun/ubuntu/ focal-security main restricted universe multiverse
deb-src http://mirrors.aliyun/ubuntu/ focal-security main restricted universe multiverse

deb http://mirrors.aliyun/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://mirrors.aliyun/ubuntu/ focal-updates main restricted universe multiverse

deb http://mirrors.aliyun/ubuntu/ focal-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun/ubuntu/ focal-proposed main restricted universe multiverse

deb http://mirrors.aliyun/ubuntu/ focal-backports main restricted universe multiverse
deb-src http://mirrors.aliyun/ubuntu/ focal-backports main restricted universe multiverse

$ sudo apt upgrade
$ sudo apt update
还尝试过这些下面命令, 但是不能解决问题 
$ sudo apt update --fix-missing [package]
$ sudo apt install -f [package]

build-essential用处】
开机启动Ubuntu ssh

本文标签: BuildUbuntuessentialdev