Installer misidentifies glibc Ubuntu as musl when musl tooling is also installed

Open Beginner friendly
#10,667 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
70/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
bash
Domain
cli

Research direction

Start at the installer’s check_libc function and reproduce the detection on Ubuntu with musl tooling installed. Verify that a positive glibc check takes precedence over musl loader detection, and that running aws update no longer exits with the musl-based Linux error.

Written by the indexing model from the issue text.

Description

bug needs-triage
Describe the bug

The installer exits "musl-based linux detected" when on a glibc system (Ubuntu LTS)

Expected Behavior

It recognizes that the host uses glibc and updates AWS CLI.

Current Behavior

The installer exits with “musl-based Linux detected.”

Reproduction Steps
  1. Install Ubuntu's musl package alongside glibc.
  2. Run aws update.
Possible Solution

Alter the check_libc function slighty: accept a positive glibc check before looking for musl loader files.

check_libc() {
    [ "$PLATFORM" = "linux" ] || return 0

    local libc_version
    if command -v getconf >/dev/null 2>&1; then
      libc_version=$(getconf GNU_LIBC_VERSION 2>/dev/null || true)
      case "$libc_version" in
        "glibc "*) return 0 ;;
      esac
    fi

    if compgen -G '/lib/ld-musl-*' >/dev/null 2>&1 || \
       compgen -G '/lib64/ld-musl-*' >/dev/null 2>&1; then
      error 1 "musl-based Linux detected. AWS CLI v2 binaries require glibc; install from source instead."
    fi
  }

alternatively add a flag to imply "i know what im doing" that short circuits the check to true.

Additional Information/Context

No response

CLI version used

aws-cli/2.36.49 Python/3.14.6 Linux/7.0.0-31-generic exe/x86_64.ubuntu.26

Environment details (OS name and version, etc.)

Ubuntu 26.04.1 LTS x86_64

Dominant language
Python
Stars
17.3k
Forks
4.7k
Avg merge
1d 7h
Merged PRs (30d)
21

Contributor guide

Open the contributing guide

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.

More from aws/aws-cli

All issues in aws/aws-cli

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.