actions / actions/runner

installdependencies.sh: add fallback to libssl-dev / libicu-dev for Debian 14+

Open Beginner friendly
#4,600 1 comment 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

src/Misc/layoutbin/installdependencies.sh uses hardcoded, versioned package names for OpenSSL and ICU libraries:

  • OpenSSL: tries libssl3t64$libssl3$libssl1.1$libssl1.0.2$libssl1.0.0$ (line 105)
  • ICU: tries libicu80libicu79 → … → libicu52 (line 113)

On Debian 14 (and potentially other newer distributions), none of these versioned packages may exist. The script has no fallback to the unversioned development packages (libssl-dev, libicu-dev) which are available on these systems.

When all fallbacks are exhausted, the script exits with:

Can't install dotnet core dependencies.

This blocks self-hosted runner setup on Debian 14.

To Reproduce

  1. Set up a Debian 14 (or newer) system.
  2. Run sudo ./src/Misc/layoutbin/installdependencies.sh
  3. Observe failure — none of the versioned libssl* or libicu* packages can be found by apt-get.

Expected behavior

The script should fall back to the development packages (libssl-dev, libicu-dev) when none of the versioned runtime packages are available. The -dev packages are the canonical unversioned names and are available across all Debian/Ubuntu versions.

Alternatively (or additionally), the script could use apt-cache search / apt list to dynamically discover the available library package names at runtime instead of maintaining a hardcoded list.

Proposed Fix

In the Debian-based branch (after line 69), add a final fallback that tries the -dev packages before failing:

# After the existing fallback chain fails, try -dev packages
apt_get_with_fallbacks libssl-dev
if [ $? -ne 0 ]; then
    echo "'$apt_get' failed to install libssl"
    print_errormessage
    exit 1
fi

apt_get_with_fallbacks libicu-dev
if [ $? -ne 0 ]; then
    echo "'$apt_get' failed to install libicu"
    print_errormessage
    exit 1
fi

A more robust approach would be to query available packages dynamically:

# Find available libssl package
SSL_PKG=$(apt-cache search '^libssl[0-9]' | head -1 | cut -d' ' -f1)
if [ -n "$SSL_PKG" ]; then
    $apt_get install -y "$SSL_PKG"
fi

Runner Version and Platform

  • Version of runner: latest (main branch, commit c814d7ca)
  • OS: Debian 14 (and any future Debian/Ubuntu versions where versioned so-names change)

What's not working?

The installdependencies.sh script cannot install required .NET dependencies on Debian 14 because:

Package type Hardcoded names in script Available on Debian 14
OpenSSL libssl3t64, libssl3, libssl1.1, libssl1.0.2, libssl1.0.0 libssl-dev
ICU libicu80libicu52 libicu-dev (or libicu74 etc.)

Additional context

  • The Debian-based branch starts at line 45 of the script.
  • The apt_get_with_fallbacks function (line 77–95) tries each argument in order but gives up if none succeeds.
  • This pattern has the same maintenance burden as the ICU version list — each new Debian/Ubuntu release may introduce a new soname and break the script again.
  • Using the -dev packages as a final fallback avoids this maintenance treadmill.

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 src/Misc/layoutbin/installdependencies.sh, reading the Debian-based branch and the apt_get_with_fallbacks function around the mentioned lines. Reproduce the dependency installation on Debian 14, then verify that the final fallback handles libssl-dev and libicu-dev and that the script completes successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
bash, debian
Domain
devops, operating-systems
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
72/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.