Codex CLI 0.137.0 standalone installer is broken on Linux x64
The official standalone installer for Codex CLI 0.137.0 appears to be broken on Linux x64.
The documented install command:
curl -fsSL https://chatgpt.com/codex/install.sh | sh
fails before installing Codex.
Environment
OS: Linux x64
User: root
Install method: official standalone installer
Target version: 0.137.0
Actual behavior
Running the official installer:
curl -fsSL https://chatgpt.com/codex/install.sh | sh
produces:
==> 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.
So the installer aborts and no codex binary is installed.
After that:
type -a codex
codex --version
results in:
-bash: type: codex: not found
-bash: /root/.local/bin/codex: No such file or directory
Additional findings
As a diagnostic step, I downloaded the installer and patched it to avoid the broken codex-package_SHA256SUMS path:
curl -fsSL https://chatgpt.com/codex/install.sh -o /tmp/codex-install.sh
sed -i 's/checksum_asset="codex-package_SHA256SUMS"/checksum_asset="__disabled_codex-package_SHA256SUMS"/' /tmp/codex-install.sh
sh /tmp/codex-install.sh
That got past the checksum issue but failed during installation:
==> Installing standalone package to /root/.codex/packages/standalone/releases/0.137.0-x86_64-unknown-linux-musl
cp: cannot stat '/tmp/tmp.iqylfXbvms/extract/package/vendor/x86_64-unknown-linux-musl/codex/codex': No such file or directory
This suggests the installer expects:
package/vendor/x86_64-unknown-linux-musl/codex/codex
but the package layout appears to have changed.
After patching that expected path from:
/codex/codex
to:
/bin/codex
the installer failed again:
cp: cannot stat '/tmp/tmp.iZgH0RKJ2p/extract/package/vendor/x86_64-unknown-linux-musl/path/rg': No such file or directory
So the installer also appears to expect:
package/vendor/x86_64-unknown-linux-musl/path/rg
while the current package layout seems to use a different path, likely:
package/vendor/x86_64-unknown-linux-musl/codex-path/rg
Expected behavior
The official installer should:
- resolve version
0.137.0, - download the Linux x64 package,
- find a valid SHA-256 digest,
- verify the archive,
- install Codex successfully,
- make
codex --versionreturncodex-cli 0.137.0.
Actual behavior summary
The installer fails because:
codex-package_SHA256SUMSdoes not contain a digest for:
codex-package-x86_64-unknown-linux-musl.tar.gz
- even when bypassing that checksum-file path, the installer appears to expect old package paths:
vendor/x86_64-unknown-linux-musl/codex/codex
vendor/x86_64-unknown-linux-musl/path/rg
while the published package seems to use a newer layout.
Impact
The official standalone installation path for Codex CLI 0.137.0 on Linux x64 is unusable.
This looks like the install script and the published release assets are out of sync.
Question: Was this installer tested using CI/CD against the actual published Linux x64 release archive before release?
2 Comments
I hit the same error on Linux x64 with Codex CLI
0.137.0:In my case, installing GNU awk fixed the standalone installer:
After that, the installer completed successfully and installed the standalone package to:
So at least for my environment, this looks consistent with the
mawk/awkchecksum parsing issue rather than the SHA-256 entry actually being missing. It may be related to the AWK matcher using:which can fail on systems where
/usr/bin/awkismawk. A portable fix might be to avoid the interval expression and use something like:The standalone installer worked after
gawkwas installed.Same bug on aarch64 (Ubuntu 22.04), so it isn't x64 specific. The mawk interval-expression cause @fangyuansama found is the whole story.
Two things not in the thread yet:
awkis gawk, a cleancurl | shextracts the standard layout and installs fine, nothing is desynced.{64}is the only interval expression in a regex anywhere ininstall.sh, so that one line change is the complete fix, no other awk spots to touch.