0

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://i.stack.imgur.com/hkY0j.jpg

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?

0 Answers0