Score:0

Unmet dependencies trying to install build-essential

cn flag

I'm trying to install the build-essential package on Ubuntu 18.04 LTS, but it says I have unmet dependencies.

$ sudo apt-get install build-essential
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
You might want to run 'apt --fix-broken install' to correct these.
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:7.2) but it is not going to be installed
 libbrotli1 : Depends: libc6 (>= 2.29) but 2.27-3ubuntu1.2 is to be installed
 libc6 : Breaks: libc6:i386 (!= 2.27-3ubuntu1.2) but 2.31-13 is to be installed
 libc6:i386 : Breaks: locales (< 2.31) but 2.27-3ubuntu1.2 is to be installed
              Recommends: libidn2-0:i386 (>= 2.0.5~) but it is not going to be installed
              Recommends: libnss-nis:i386 but it is not installable
              Recommends: libnss-nisplus:i386 but it is not installable
              Breaks: libc6 (!= 2.31-13) but 2.27-3ubuntu1.2 is to be installed
 libc6-dbg : Depends: libc6 (= 2.27-3ubuntu1.4) but 2.27-3ubuntu1.2 is to be installed
 libc6-i386 : Depends: libc6 (= 2.31-13) but 2.27-3ubuntu1.2 is to be installed
 libc6-x32 : Depends: libc6 (= 2.27-3ubuntu1.4) but 2.27-3ubuntu1.2 is to be installed
 libcairo2 : Depends: libc6 (>= 2.29) but 2.27-3ubuntu1.2 is to be installed
 libfile-fcntllock-perl : Depends: libc6 (>= 2.28) but 2.27-3ubuntu1.2 is to be installed
 libio-pty-perl : Depends: libc6 (>= 2.28) but 2.27-3ubuntu1.2 is to be installed
 libperl5.32 : Depends: libc6 (>= 2.29) but 2.27-3ubuntu1.2 is to be installed
 libpng16-16 : Depends: libc6 (>= 2.29) but 2.27-3ubuntu1.2 is to be installed
 libtext-charwidth-perl : Depends: perlapi-5.26.0
 perl-base : PreDepends: libc6 (>= 2.29) but 2.27-3ubuntu1.2 is to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or specify a solution).

I tried using -f, but it doesn't help. I can't even open a browser right now, the output is here: https://imgur.com/a/xEQGpVR

I guess I need libc6 2.29, but after running `apt-cache madison libc6`` I found out it doesn't exist for 18.04:

$ apt-cache madison libc6     
libc6 | 2.27-3ubuntu1.4 | http://mirror.1000mbps.com/ubuntu bionic-updates/main amd64 Packages
libc6 | 2.27-3ubuntu1.2 | http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages
libc6 | 2.27-3ubuntu1 | http://mirror.1000mbps.com/ubuntu bionic/main amd64 Packages

How do I solve this?

Someone avatar
my flag
Please [edit] to include the output of `sudo apt --fix-broken install`.
user6394139 avatar
cn flag
Added it. I hope a picture is okay.
Someone avatar
my flag
No, please add the full output of the command in the form of text. The picture is NOT OK. Also, use ``` to code format the text. Thanks :)
darth_epoxy avatar
nl flag
Um, what about `sudo apt-get install libc6`
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.