Windows 11, WSL with Ubuntu 20.04.3 LTS: cannot perform "sudo apt install build-essential" because of missing dependencies

  apt, ubuntu, windows, windows-subsystem-for-linux

I need to install Salome-Meca – Code_Aster on a Windows 11 machine running Ubuntu 20.04.3 LTS inside WSL. This software requires a series of extra modules (see https://www.code-aster.org/V2/spip.php?article303).

When typing on the terminal:

sudo apt update
sudo apt upgrade
sudo apt install build-essential

I always get the following message after the third command line instruction:

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.

How can I overcome this? I have read elsewhere (maybe in a 2016 post?) that the solution is to "downgrade". Downgrade what? Is it still valid in 2021?

Source: Windows Questions

LEAVE A COMMENT