I recently installed WSL2 with Ubuntu 24.04 on my Windows 10 machine. I discovered that I cannot build any Docker images where the Dockerfile runs apt-get install
because I get an error similar to:
Dockerfile:
FROM osrf/ros:jazzy-desktop
RUN apt-get update && apt-get install -y wget
Build error:
Package wget is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source.
If I build just a jazzy-desktop
container and attach to the container and run the apt-get
command it works.
I’ve checked that I have network access from WSL by pinging a public address.