更新:

更新:

返回以下错误:

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:
 build-essential : Depends: libc6-dev but it is not going to be installed or
                            libc-dev
                   Depends: g++ (>= 4:9.2) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

我已尝试过sudo apt-get updatesudo apt install cmake但错误是一样的。

输出apt-cache policy build-essential libc6-dev libc6 libc-dev g++ cmake

build-essential:
  Installed: (none)
  Candidate: 12.8ubuntu1
  Version table:
     12.8ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages
libc6-dev:
  Installed: (none)
  Candidate: 2.31-0ubuntu9
  Version table:
     2.31-0ubuntu9 500
        500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages
libc6:
  Installed: 2.31-0ubuntu9.3
  Candidate: 2.31-0ubuntu9.3
  Version table:
 *** 2.31-0ubuntu9.3 100
        100 /var/lib/dpkg/status
     2.31-0ubuntu9 500
        500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages
libc-dev:
  Installed: (none)
  Candidate: (none)
  Version table:
g++:
  Installed: (none)
  Candidate: 4:9.3.0-1ubuntu2
  Version table:
     4:9.3.0-1ubuntu2 500
        500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages
cmake:
  Installed: 3.16.3-1ubuntu1
  Candidate: 3.16.3-1ubuntu1
  Version table:
 *** 3.16.3-1ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages
        100 /var/lib/dpkg/status

输出sudo apt update

Hit:1 http://archive.ubuntu.com/ubuntu focal InRelease
Hit:2 http://ppa.launchpad.net/jonmagon/kdiskmark/ubuntu focal InRelease                                                                                    
Hit:3 http://dl.google.com/linux/chrome/deb stable InRelease                                                                                                
Ign:4 http://repo.vivaldi.com/stable/deb stable InRelease                                                                                                   
Hit:5 http://packages.microsoft.com/repos/code stable InRelease                                                                                   
Hit:6 http://apt.insync.io/ubuntu focal InRelease                                                                           
Hit:7 http://repo.vivaldi.com/stable/deb stable Release                                                                     
Hit:8 https://download.docker.com/linux/ubuntu focal InRelease                                        
Hit:9 https://download.sublimetext.com apt/stable/ InRelease     

** grep ^deb -r /etc/apt/ --include=*.list**

said@~/Projects/Rust/hello_world$ grep ^deb -r /etc/apt/ --include=*.list
/etc/apt/sources.list:deb http://archive.ubuntu.com/ubuntu focal main universe restricted
/etc/apt/sources.list:deb-src http://archive.ubuntu.com/ubuntu focal main universe restricted #Added by software-properties
/etc/apt/sources.list.d/insync.list:deb http://apt.insync.io/ubuntu/ focal non-free contrib
/etc/apt/sources.list.d/vivaldi.list:deb http://repo.vivaldi.com/stable/deb/ stable main
/etc/apt/sources.list.d/google-chrome.list:deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main
/etc/apt/sources.list.d/jonmagon-ubuntu-kdiskmark-focal.list:deb http://ppa.launchpad.net/jonmagon/kdiskmark/ubuntu/ focal main
/etc/apt/sources.list.d/vscode.list:deb [arch=amd64,arm64,armhf] http://packages.microsoft.com/repos/code/ stable main
/etc/apt/sources.list.d/docker.list:deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu/ focal stable 
/etc/apt/sources.list.d/sublime-text.list:deb https://download.sublimetext.com/ apt/stable/

更新:

我不得不重新安装 Kubuntu 20.04。这是一次肮脏的安装,其中格式化//boot挂载点已经发生但/home保持原样,然后创建与上次安装同名的用户以保持家庭设置完好无损。

我认为这是基于 Debian 的发行版的一个主要缺点。我认为 Fedora或 OpenSuseapt找不到它。但是,我认为在使用之前应该先使用,甚至从 *.deb 文件安装也应该如此。dnfyumapt installapt update

相关内容