Skip to content

Docker build fails: ubuntu:latest now points to 24.04 where Python 3.6 and python3-distutils are unavailable #41

Description

@BasmaBoulekhras

Description

The action fails to build its Docker image because the Dockerfile uses FROM ubuntu:latest, which now points to Ubuntu 24.04 (Noble). This breaks the build because:
Python 3.6 is not available on Ubuntu 24.04 - The deadsnakes PPA no longer builds Python 3.6 for Noble because it requires libssl<3
python3-distutils package doesn't exist - The distutils module was removed from Python 3.12 (the default Python on Ubuntu 24.04)

Error message

Package python3-distutils 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

E: Package 'python3-distutils' has no installation candidate

Root Cause

In Dockerfile line 6:

RUN apt-get install -y python3.6 python3-distutils python3-pip python3-apt python3-venv

The deadsnakes PPA documentation confirms:

Supported Ubuntu and Python Versions

  • Ubuntu 24.04 (noble) Python3.7 - Python3.11, Python3.13

Why some packages aren't built:

  • Note: for jammy and noble, older python versions require libssl<3 so they are not currently built

Suggested Fix

Pin the base image to Ubuntu 20.04 in the Dockerfile:

# Change from:
FROM ubuntu:latest

# To:
FROM ubuntu:20.04

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions