actions / actions/runner

Installing of Python 2.7 is not supported in Ubuntu 24.04

Open
#4,173 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
C#
Stars
6.3k
Forks
1.4k
Avg merge
1d 16h
Merged PRs (30d)
24

Description

Describe the bug
Currently, when running any workflow, the "Initialization Environment" conducts the following steps:

  sudo rm -rf /etc/apt/sources.list.d/* /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL
  sudo rm -rf /etc/apt/sources.list.d/* /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL
  sudo docker image prune --all --force
  sudo -E apt-get -qq update
  sudo -E apt-get -qq install ack antlr3 asciidoc autoconf automake autopoint binutils bison build-essential bzip2 ccache cmake cpio curl device-tree-compiler fastjar flex gawk gettext gcc-multilib g++-multilib git gperf haveged help2man intltool libc6-dev-i386 libelf-dev libfuse-dev libglib2.0-dev libgmp3-dev libltdl-dev libmpc-dev libmpfr-dev libncurses5-dev libncursesw5-dev libpython3-dev libreadline-dev libssl-dev libtool lrzsz mkisofs msmtp ninja-build p7zip p7zip-full patch pkgconf python2.7 python3 python3-pyelftools python3-setuptools qemu-utils rsync scons squashfs-tools subversion swig texinfo uglifyjs upx-ucl unzip vim wget xmlto xxd zlib1g-dev
  sudo -E apt-get -qq autoremove --purge
  sudo -E apt-get -qq clean
  sudo timedatectl set-timezone "$TZ"
  sudo mkdir -p /workdir
  sudo chown $USER:$GROUPS /workdir

However, for a self-hosted runner running Ubuntu 24.04, this step always fail because Ubuntu 24.04 has no python2.7 in its packages anymore.

To Reproduce
Steps to reproduce the behavior:

  1. Set up a self-hosted runner as described in https://github.com/actions/runner-images/blob/main/docs/create-image-and-azure-resources.md
  2. Set up runner script using what was provided in Repo settings / Runners / Add new self-hosted runner
  3. Try launch any workflow in the corresponding repo
  4. You always fail at "Initialization Environment" step

Expected behavior
"Initialization Environment" step should run successfully for any supported runner image.

Runner Version and Platform

Self-hosted runner provisioned with ImageType Ubuntu2404 (see https://github.com/actions/runner-images/blob/main/docs/create-image-and-azure-resources.md)

OS of the machine running the runner? Ubuntu

What's not working?

Image

Job Log Output

Run sudo rm -rf /etc/apt/sources.list.d/* /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL
sudo rm -rf /etc/apt/sources.list.d/* /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL
sudo docker image prune --all --force
sudo -E apt-get -qq update
sudo -E apt-get -qq install ack antlr3 asciidoc autoconf automake autopoint binutils bison build-essential bzip2 ccache cmake cpio curl device-tree-compiler fastjar flex gawk gettext gcc-multilib g++-multilib git gperf haveged help2man intltool libc6-dev-i386 libelf-dev libfuse-dev libglib2.0-dev libgmp3-dev libltdl-dev libmpc-dev libmpfr-dev libncurses5-dev libncursesw5-dev libpython3-dev libreadline-dev libssl-dev libtool lrzsz mkisofs msmtp ninja-build p7zip p7zip-full patch pkgconf python2.7 python3 python3-pyelftools python3-setuptools qemu-utils rsync scons squashfs-tools subversion swig texinfo uglifyjs upx-ucl unzip vim wget xmlto xxd zlib1g-dev
sudo -E apt-get -qq autoremove --purge
sudo -E apt-get -qq clean
sudo timedatectl set-timezone "$TZ"
sudo mkdir -p /workdir
sudo chown $USER:$GROUPS /workdir
shell: /usr/bin/bash -e {0}
env:
REPO_URL: https://github.com/coolsnowwolf/lede
REPO_BRANCH: master
FEEDS_CONF: feeds.conf.default
CONFIG_FILE: .config
DIY_P1_SH: diy-part1.sh
DIY_P2_SH: diy-part2.sh
UPLOAD_BIN_DIR: false
UPLOAD_FIRMWARE: true
UPLOAD_RELEASE: true
TZ: Asia/Shanghai
DEBIAN_FRONTEND: noninteractive
Total reclaimed space: 0B
E: Unable to locate package python2.7
E: Couldn't find any package by glob 'python2.7'
E: Couldn't find any package by regex 'python2.7'
Error: Process completed with exit code 100.

Runner and Worker's Diagnostic Logs

If applicable, add relevant diagnostic log information. Logs are located in the runner's _diag folder. The runner logs are prefixed with Runner_ and the worker logs are prefixed with Worker_. Each job run correlates to a worker log. All sensitive information should already be masked out, but please double-check before pasting here.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the self-hosted runner's "Initialization Environment" entry point and the package-install command shown in the issue; the payload names no source file or test. Compare the Ubuntu 24.04 behavior with the runner-image setup described in docs/create-image-and-azure-resources.md, and verify that initialization completes successfully on a supported Ubuntu 24.04 runner.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, shell, ubuntu
Domain
ci-cd, devops, infrastructure, operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.