installdependencies.sh: add fallback to libssl-dev / libicu-dev for Debian 14+
Nobody has claimed this yet.
- 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
libicu80→libicu79→ … →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
- Set up a Debian 14 (or newer) system.
- Run
sudo ./src/Misc/layoutbin/installdependencies.sh - Observe failure — none of the versioned
libssl*orlibicu*packages can be found byapt-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 | libicu80 … libicu52 |
libicu-dev (or libicu74 etc.) |
Additional context
- The Debian-based branch starts at line 45 of the script.
- The
apt_get_with_fallbacksfunction (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
-devpackages as a final fallback avoids this maintenance treadmill.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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