The following error is returned:
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.
I have tried sudo apt-get update
and sudo apt install cmake
but the error is the same.
The output of 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
Output of 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/
Update:
I had to reinstall Kubuntu 20.04. It was dirty installation in which formatting of /
and /boot
mount points had been occurred but /home
left as it is and then creating the user with the same name of the previous installation to keep home settings intact.
I think this a major drawback of Debian based distros apt
. I think that it is not found for Fedora dnf
or OpenSuse yum
. However, I think that the usage of apt install
should be preceded by apt update
and even the installation from *.deb files too.
0 Answers