For example, awk
is a virtual package provided by original-awk
, mawk
and gawk
.
Trying to install it directly yields:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package awk is a virtual package provided by:
original-awk:i386 2012-12-20-4
mawk:i386 1.3.3-17ubuntu2
gawk:i386 1:4.1.1+dfsg-1
original-awk 2012-12-20-4
mawk 1.3.3-17ubuntu2
gawk 1:4.1.1+dfsg-1
You should explicitly select one to install.
E: Package 'awk' has no installation candidate
However many virtual packages are needed as dependencies by the packages installed by default, for example awk
itself is needed by base-files
, which checking the APT logs is installed along with a bunch of other packages through apt-get --yes
; somehow APT ends up picking one of the three automatically (I'm pretty sure that's mawk
, but that's not the point of the question).
How does APT choose the specific package to install in this case?