install.sh checksum lookup fails on systems using mawk

Resolved 💬 5 comments Opened May 23, 2026 by preference-kim Closed Jun 18, 2026
💡 Likely answer: A maintainer (github-actions[bot], contributor) responded on this thread — see the highlighted reply below.

What version of Codex CLI is running?

codex-cli 0.132.0

What subscription do you have?

Pro 5x

Which model were you using?

_No response_

What platform is your computer?

Linux 6.8.0-85-generic x86_64 x86_64

What issue are you seeing?

The installer fails to find the SHA-256 digest for the Linux x64 package:

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

Full output:

Updating Codex via `sh -c 'curl -fsSL https://chatgpt.com/codex/install.sh | sh'`...
==> Updating Codex CLI from 0.132.0 to 0.133.0
==> Detected platform: Linux (x64)
==> Resolved version: 0.133.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 | sh'` failed with status exit status: 1

What steps can reproduce the bug?

Run the standalone installer on a Linux x64 system where the default awk is mawk:

$ awk -W version
mawk 1.3.4 20200120
...

$ curl -fsSL https://chatgpt.com/codex/install.sh | sh
... # Same error as shown above

This appears to match the error path reported in #24035.

What is the expected behavior?

The standalone installer should find the matching SHA-256 digest in codex-package_SHA256SUMS and should work with the system default awk on common Linux distributions, including systems where that default is mawk.

Additional information

The failure appears to come from package_archive_digest() in the currently served install.sh:

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

mawk's internal regex engine does not match the {64} interval expression here, so the checksum line is not matched even though it is present in codex-package_SHA256SUMS.

One portable way to express the same check would be:

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

This preserves the SHA-256 length check while avoiding awk interval syntax. If this diagnosis looks correct, I would be happy to open a small PR.

View original on GitHub ↗

5 Comments

github-actions[bot] contributor · 3 months ago

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

  • #24035

Powered by Codex Action

preference-kim · 3 months ago
Potential duplicates detected.

Thanks, I saw that and actually left the gawk workaround there :)

But #24035 is more about choosing between the npm and standalone update paths, while this issue is just about the checksum lookup itself.

yui-stingray · 3 months ago

As of this check, openai/codex@7d47056 and the installer currently served from https://chatgpt.com/codex/install.sh both still have the same package_archive_digest() matcher:

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

I can reproduce the portability issue with mawk 1.3.4 20200120: the interval-regex form does not match a valid 64-hex SHA-256 field, while the equivalent length check does:

interval-NO_MATCH
length-plus-match

So the issue body’s suggested predicate looks like the right minimal fix for scripts/install/install.sh:

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

That keeps the SHA-256 length validation while avoiding awk interval syntax in the standalone installer path.

Kopczynski · 3 months ago

Ran into this same issue and was able to replicate the minimal fix in a fork.

 ✘ ⚡ root@fd51e699b96a ~ awk -W version
mawk 1.3.4 20200120
Copyright 2008-2019,2020, Thomas E. Dickey
Copyright 1991-1996,2014, Michael D. Brennan

random-funcs:       srandom/random
regex-funcs:        internal
compiled limits:
sprintf buffer      8192
maximum-integer     2147483647

 ⚡ root@fd51e699b96a ~  curl -fsSL https://chatgpt.com/codex/install.sh | sh 
==> Installing Codex CLI
==> Detected platform: Linux (ARM64)
==> Resolved version: 0.134.0
==> Downloading Codex CLI
Could not find SHA-256 digest for codex-package-aarch64-unknown-linux-musl.tar.gz in codex-package_SHA256SUMS.
 
✘ ⚡ root@fd51e699b96a  ~  curl -fsSL https://raw.githubusercontent.com/Kopczynski/codex/a5c23b0c8e0dd0bfca44d048858e1f06ae16f7f8/scripts/install/install.sh | sh
==> Installing Codex CLI
==> Detected platform: Linux (ARM64)
==> Resolved version: 0.134.0
==> Downloading Codex CLI
==> Installing standalone package to /root/.codex/packages/standalone/releases/0.134.0-aarch64-unknown-linux-musl
==> /root/.local/bin is already on PATH
==> Current terminal: codex
==> Future terminals: open a new terminal and run: codex
Codex CLI 0.134.0 installed successfully.
Start Codex now? [y/N] y
==> Launching Codex

+1 to @preference-kim 's suggested fix.

rexjz · 2 months ago

I can still reproduce this on 0.137.0 with the same mawk version:

awk: mawk 1.3.4 20200120
platform: Linux x64
release: 0.137.0

The installer fails with:

==> Installing Codex CLI
==> Detected platform: Linux (x64)
==> Resolved version: 0.137.0
==> Downloading Codex CLI
Could not find SHA-256 digest for codex-package-x86_64-unknown-linux-musl.tar.gz in codex-package_SHA256SUMS.

A local patch

curl -fsSL https://raw.githubusercontent.com/openai/codex/f221438b691b8f749d98f22077c93ebe01923fbe/scripts/install/install.sh -o /tmp/codex-install.sh

sed -i.bak '/\$2 == asset && \$1 ~ \/\^\[0-9a-fA-F\]{64}\$\/ {/c\
    $2 == asset && length($1) == 64 && $1 ~ /^[0-9a-fA-F]+$/ {' /tmp/codex-install.sh

sh /tmp/codex-install.sh --release 0.137.0