Codex CLI self-update still fails on Ubuntu 22.04: missing SHA-256 digest for Linux x64 musl package

Open 💬 5 comments Opened Jun 9, 2026 by Boilerplate4u
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

Codex CLI self-update still fails on Ubuntu 22.04: missing SHA-256 digest for Linux x64 musl package

Summary

The Codex CLI self-update still fails on Ubuntu 22.04 when updating from 0.137.0 to 0.138.0.

The updater invokes the standalone installer:

sh -c 'curl -fsSL https://chatgpt.com/codex/install.sh | CODEX_NON_INTERACTIVE=1 sh'

That installer then fails while resolving the SHA-256 digest for the Linux x64 musl package:

Could not find SHA-256 digest for codex-package-x86_64-unknown-linux-musl.tar.gz in codex-package_SHA256SUMS.

This looks like the same installer/checksum parsing failure previously reported in issues such as #24219 and #24869, but it is still reproducible with the current 0.138.0 update path.

Codex version

Before update:

0.137.0

Target version shown by Codex:

0.138.0

Platform

Ubuntu 22.04.5 LTS (Jammy Jellyfish)
Linux x64

/etc/os-release:

NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.5 LTS (Jammy Jellyfish)"

Steps to reproduce

Start Codex CLI on Ubuntu 22.04.5 with Codex CLI 0.137.0 installed.

Codex displays:

✨ Update available! 0.137.0 -> 0.138.0

Release notes: https://github.com/openai/codex/releases/latest

› 1. Update now (runs `sh -c 'curl -fsSL https://chatgpt.com/codex/install.sh | CODEX_NON_INTERACTIVE=1 sh'`)
  2. Skip
  3. Skip until next version

  Press enter to continue

Choose:

1. Update now

Actual result

The update fails:

Updating Codex via `sh -c 'curl -fsSL https://chatgpt.com/codex/install.sh | CODEX_NON_INTERACTIVE=1 sh'`...
==> Updating Codex CLI from 0.137.0 to 0.138.0
==> Detected platform: Linux (x64)
==> Resolved version: 0.138.0
==> Downloading Codex CLI
Could not find SHA-256 digest for codex-package-x86_64-unknown-linux-musl.tar.gz in codex-package_SHA256SUMS.
Error: `sh -c 'curl -fsSL https://chatgpt.com/codex/install.sh | CODEX_NON_INTERACTIVE=1 sh'` failed with status exit status: 1

Expected result

Codex CLI should self-update successfully from 0.137.0 to 0.138.0 on stock Ubuntu 22.04.5 without requiring the user to manually install alternate awk implementations or debug the installer.

Why this looks like a regression / unresolved installer issue

This appears to be the same failure mode as earlier installer issues where the installer could not match the digest line in codex-package_SHA256SUMS for:

codex-package-x86_64-unknown-linux-musl.tar.gz

Previous reports suggested the root cause may be non-portable awk regex handling, especially on Debian/Ubuntu systems using mawk as default awk.

The important point is that the failure is still visible through the built-in Codex CLI self-update flow in the current 0.138.0 release cycle, so users can hit it without manually running the installer.

Suggested fix

Please make the installer checksum lookup portable across stock Debian/Ubuntu systems.

For example, avoid relying on awk interval regex syntax such as:

$1 ~ /^[0-9a-fA-F]{64}$/

and instead use a more portable check such as:

length($1) == 64 && $1 ~ /^[0-9a-fA-F]+$/

or perform the SHA-256 length/character validation in POSIX shell after extracting the checksum field.

Additional note

This is not a request for a local workaround. The issue is that Codex CLI’s own self-update path still invokes an installer that fails on a common Ubuntu/Debian environment.

View original on GitHub ↗

5 Comments

github-actions[bot] contributor · 2 months ago

Potential duplicates detected. Please review them and close your issue if it is a duplicate.

  • #26389
  • #26802

Powered by Codex Action

Boilerplate4u · 2 months ago

Is the CI/CD pipeline install check broken?

Boilerplate4u · 2 months ago
Potential duplicates detected. Please review them and close your issue if it is a duplicate. Codex CLI 0.137.0 standalone installer is broken on Linux x64 #26389 Installer fails when /usr/bin/awk is mawk: digest check uses a {64} interval regex #26802 _Powered by Codex Action_

This is about the new 0.138.0. AI, tell the team to fix the CI/CD pipline! ;-D

sridhar-3009 · 2 months ago

Root-cause analysis and fix

Root cause: mawk (default awk on Ubuntu/Debian) does not support ERE interval expressions ({n}) unless invoked with -W interval. The package_archive_digest function in scripts/install/install.sh uses:

$2 == asset && $1 ~ /^[0-9a-fA-F]{64}$/ {

On systems with mawk, {64} is treated as a literal string rather than a repetition quantifier, so the regex never matches, digest stays empty, and the installer exits with:

Could not find SHA-256 digest for codex-package-x86_64-unknown-linux-musl.tar.gz in codex-package_SHA256SUMS.

This is not a checksum-file formatting issue — the file is correct. The awk pattern fails silently on mawk.

One-line fix (portable across gawk, mawk, nawk, and POSIX awk):

-    $2 == asset && $1 ~ /^[0-9a-fA-F]{64}$/ {
+    $2 == asset && length($1) == 64 && $1 ~ /^[0-9a-fA-F]+$/ {

The length() check enforces the 64-character constraint; + is universally supported.

Verified: fix is at sridhar-3009/codex@fix/install-sha256-mawk-compat — single-line diff in scripts/install/install.sh.

Boilerplate4u · 2 months ago

Same problem again, now with the 0.137.0 -> 0.139.0 update.

So the issue was not limited to the previous 0.138.0 release. The official Codex CLI self-update path is still offering a broken update and still fails on the same missing SHA-256 digest for codex-package-x86_64-unknown-linux-musl.tar.gz.

I opened a new issue with the current 0.139.0 reproduction here: https://github.com/openai/codex/issues/28334

It would be useful if the installer/update path was actually tested on the common Linux targets it claims to support before the updater offers these releases to users.