UPDATE: I have re-installed (3 times) Ubuntu, and performed sudo apt policy libc6 libc6-dev
with this output:
libc6:
Installed: 2.35-0ubuntu3.1
Candidate: 2.35-0ubuntu3.1
Version table:
*** 2.35-0ubuntu3.1 100
100 /var/lib/dpkg/status
N: Unable to locate package libc6-dev
I then did a sudo apt update
and another sudo apt policy libc6 libc6-dev
and got this output:
libc6:
Installed: 2.35-0ubuntu3.1
Candidate: 2.35-0ubuntu3.1
Version table:
*** 2.35-0ubuntu3.1 500
500 http://us.archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages
100 /var/lib/dpkg/status
2.35-0ubuntu3 500
500 http://us.archive.ubuntu.com/ubuntu jammy/main amd64 Packages
libc6-dev:
Installed: (none)
Candidate: 2.35-0ubuntu3.1
Version table:
2.35-0ubuntu3.1 500
500 http://us.archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages
2.35-0ubuntu3 500
500 http://us.archive.ubuntu.com/ubuntu jammy/main amd64 Packages
I then was able to perform sudo apt-get install build-essential gdb g++
successfully.
Thank you @steeldriver for looking into this issue with me. I don't know how to close this Question; I suppose the Moderators will eventually do that. Cheers!!
I am running into the same problems as stated in an older question (July 2018), but now (Dec 2022) with a newer version of Ubuntu (22.04 LTS).
When installing the g++ compiler and gdb debugger using sudo apt-get install build-essential gdb g++
I get the following output, with an error for libc6-dev
:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
gdb is already the newest version (12.0.90-0ubuntu1).
gdb set to manually installed.
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:
libc6-dev : Depends: libc6 (= 2.35-0ubuntu3) but 2.35-0ubuntu3.1 is to be installed
E: Unable to correct problems, you have held broken packages.
This is the output of cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.1 LTS" NAME="Ubuntu" VERSION_ID="22.04"
VERSION="22.04.1 LTS (Jammy Jellyfish)" VERSION_CODENAME=jammy
ID=ubuntu ID_LIKE=debian HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
The last comment offered by user Olimjon in that question recommends a clean installation of Ubuntu, which I have done twice, but the problem persists.
Ultimately, my goal is to follow the tutorial on OpenGL by Victor Gordan, however, I am not able to compile and run the examples successfully.
Any suggestions on how to repair the libc6-dev dependencies?
Additional & Updated Information:
Output of apt policy libc6 libc6-dev
is
libc6:
Installed: 2.35-0ubuntu3.1
Candidate: 2.35-0ubuntu3.1
Version table:
*** 2.35-0ubuntu3.1 100
100 /var/lib/dpkg/status
2.35-0ubuntu3 500
500 http://us.archive.ubuntu.com/ubuntu jammy/main amd64 Packages
libc6-dev:
Installed: (none)
Candidate: 2.35-0ubuntu3
Version table:
2.35-0ubuntu3 500
500 http://us.archive.ubuntu.com/ubuntu jammy/main amd64 Packages
The sources.list
file contains:
# deb cdrom:[Ubuntu 22.04.1 LTS _Jammy Jellyfish_ - Release amd64 (20220809.1)]/ jammy main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ jammy main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ jammy main restricted
## Major bug fix updates produced after the final release of the
## distribution.
# deb-src http://us.archive.ubuntu.com/ubuntu/ jammy-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://us.archive.ubuntu.com/ubuntu/ jammy universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ jammy universe
# deb-src http://us.archive.ubuntu.com/ubuntu/ jammy-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://us.archive.ubuntu.com/ubuntu/ jammy multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ jammy multiverse
# deb-src http://us.archive.ubuntu.com/ubuntu/ jammy-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-src http://us.archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu jammy-security main restricted
# deb-src http://security.ubuntu.com/ubuntu jammy-security main restricted
deb http://security.ubuntu.com/ubuntu jammy-security universe
# deb-src http://security.ubuntu.com/ubuntu jammy-security universe
deb http://security.ubuntu.com/ubuntu jammy-security multiverse
# deb-src http://security.ubuntu.com/ubuntu jammy-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.