codex升级之后报错

今天升级到codex 0.134.0之后运行报错:

shell 复制代码
$ codex
file:///home/simon/.npm-global/lib/node_modules/@openai/codex/bin/codex.js:122
  throw new Error(
        ^

Error: Missing optional dependency @openai/codex-linux-arm64. Reinstall Codex: npm install -g @openai/codex@latest
    at file:///home/simon/.npm-global/lib/node_modules/@openai/codex/bin/codex.js:122:9
    at ModuleJob.run (node:internal/modules/esm/module_job:430:25)
    at async onImport.tracePromise.__proto__ (node:internal/modules/esm/loader:661:26)
    at async asyncRunEntryPointWithESMLoader (node:internal/modules/run_main:101:5)

Node.js v24.14.0

按照提示重装还是在安装过程中报错:

shell 复制代码
# 先卸载并清除缓存
npm uninstall -g @openai/codex
npm cache clean --force

重装报错信息:

shell 复制代码
npm install -g @openai/codex@latest --verbose  --registry=https://registry.npmjs.org/
npm verbose cli /usr/local/bin/node /usr/local/bin/npm
npm info using npm@11.9.0
npm info using node@v24.14.0
npm verbose title npm install @openai/codex@latest
npm verbose argv "install" "--global" "@openai/codex@latest" "--loglevel" "verbose" "--registry" "https://registry.npmjs.org/"
npm verbose logfile logs-max:10 dir:/home/simon/.npm/_logs/2026-05-27T19_20_16_786Z-
npm verbose logfile /home/simon/.npm/_logs/2026-05-27T19_20_16_786Z-debug-0.log
npm http fetch GET 200 https://registry.npmjs.org/@openai%2fcodex 1409ms (cache miss)
npm http cache https://registry.npmjs.org/@openai%2fcodex 135ms (cache hit)
npm http cache https://registry.npmjs.org/@openai%2fcodex 164ms (cache hit)
npm http cache https://registry.npmjs.org/@openai%2fcodex 585ms (cache hit)
npm http cache https://registry.npmjs.org/@openai%2fcodex 874ms (cache hit)
npm http cache https://registry.npmjs.org/@openai%2fcodex 546ms (cache hit)
npm http cache https://registry.npmjs.org/@openai%2fcodex 430ms (cache hit)
npm http cache https://registry.npmjs.org/@openai%2fcodex 1586ms (cache hit)
npm http cache @openai/codex@https://registry.npmjs.org/@openai/codex/-/codex-0.134.0.tgz 0ms (cache hit)
npm http cache @openai/codex-linux-arm64@https://registry.npmjs.org/@openai/codex/-/codex-0.134.0-linux-arm64.tgz 0ms (cache hit)
npm verbose reify failed optional dependency /home/simon/.npm-global/lib/node_modules/@openai/codex/node_modules/@openai/codex-linux-arm64

changed 1 package in 7s
npm verbose cwd /home/simon/mimusic
npm verbose os Linux 6.12.11-edge-sunxi64
npm verbose node v24.14.0
npm verbose npm  v11.9.0
npm verbose exit 0
npm info ok

看提示就是下载主程序包失败,反复尝试不同版本多次依然不行。

然后使用wget单独下载此文件看到了如下信息:

shell 复制代码
wget -O codex-linux-arm64.tgz \
https://registry.npmjs.org/@openai/codex/-/codex-0.134.0-linux-arm64.tgz
--2026-05-28 03:27:42--  https://registry.npmjs.org/@openai/codex/-/codex-0.134.0-linux-arm64.tgz
正在连接 192.168.123.32:7892... 已连接。
已发出 Proxy 请求,正在等待回应... 200 OK
长度:83530982 (80M) [application/octet-stream]
正在保存至: "codex-linux-arm64.tgz"

codex-linux-arm64.tgz                   6%[===>                                                                     ]   4.86M  5.26MB/s  用时 0.9s

2026-05-28 03:27:44 (5.26 MB/s) - 在 5098688/83530982 字节处发生读取错误 (Error decoding the received TLS packet.)。重试中。

--2026-05-28 03:27:45--  (尝试次数: 2)  https://registry.npmjs.org/@openai/codex/-/codex-0.134.0-linux-arm64.tgz
正在连接 192.168.123.32:7892... 已连接。
已发出 Proxy 请求,正在等待回应... 206 Partial Content
长度:83530982 (80M),剩余 78432294 (75M) [application/octet-stream]
正在保存至: "codex-linux-arm64.tgz"

codex-linux-arm64.tgz                  12%[++++===>                                                                 ]   9.68M  5.15MB/s  用时 0.9s

2026-05-28 03:27:47 (5.15 MB/s) - 在 10151744/83530982 字节处发生读取错误 (Error decoding the received TLS packet.)。重试中。

......(此处省略n次重试)
--2026-05-28 03:29:57--  (尝试次数:16)  https://registry.npmjs.org/@openai/codex/-/codex-0.134.0-linux-arm64.tgz
正在连接 192.168.123.32:7892... 已连接。
已发出 Proxy 请求,正在等待回应... 206 Partial Content
长度:83530982 (80M),剩余 2652774 (2.5M) [application/octet-stream]
正在保存至: "codex-linux-arm64.tgz"

codex-linux-arm64.tgz                 100%[++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++==>]  79.66M  3.09MB/s  用时 0.8s

2026-05-28 03:29:58 (3.09 MB/s) - 已保存 "codex-linux-arm64.tgz" [83530982/83530982])

也就是说下载这个包因为npm没有重试机制,中间下载失败就跳过了,导致codex包无法正确下载。

于是怀疑是代理问题,再次卸载,使用国内npm镜像,就成功了。

shell 复制代码
npm install -g @openai/codex@0.134.0 --include=optional --registry=https://registry.npmmirror.com --verbose
npm verbose cli /usr/local/bin/node /usr/local/bin/npm
npm info using npm@11.9.0
npm info using node@v24.14.0
npm verbose title npm install @openai/codex@0.134.0
npm verbose argv "install" "--global" "@openai/codex@0.134.0" "--include" "optional" "--registry" "https://registry.npmmirror.com" "--loglevel" "verbose"
npm verbose logfile logs-max:10 dir:/home/simon/.npm/_logs/2026-05-27T19_35_28_002Z-
npm verbose logfile /home/simon/.npm/_logs/2026-05-27T19_35_28_002Z-debug-0.log
npm http cache https://registry.npmmirror.com/@openai%2fcodex 139ms (cache hit)
npm http cache https://registry.npmmirror.com/@openai%2fcodex 117ms (cache hit)
npm http cache https://registry.npmmirror.com/@openai%2fcodex 453ms (cache hit)
npm http cache https://registry.npmmirror.com/@openai%2fcodex 871ms (cache hit)
npm http cache https://registry.npmmirror.com/@openai%2fcodex 180ms (cache hit)
npm http cache https://registry.npmmirror.com/@openai%2fcodex 784ms (cache hit)
npm http cache https://registry.npmmirror.com/@openai%2fcodex 1646ms (cache hit)
npm http cache @openai/codex@https://registry.npmmirror.com/@openai/codex/-/codex-0.134.0.tgz 0ms (cache hit)
npm http cache @openai/codex-linux-arm64@https://registry.npmmirror.com/@openai/codex/-/codex-0.134.0-linux-arm64.tgz 0ms (cache hit)
npm http fetch GET 200 https://cdn.npmmirror.com/packages/%40openai/codex/0.134.0/codex-0.134.0.tgz 440ms (cache miss)
npm http fetch GET 200 https://cdn.npmmirror.com/packages/%40openai/codex/0.134.0-linux-arm64/codex-0.134.0-linux-arm64.tgz 10536ms (cache miss)

changed 2 packages in 15s
npm verbose cwd /tmp/codex
npm verbose os Linux 6.12.11-edge-sunxi64
npm verbose node v24.14.0
npm verbose npm  v11.9.0
npm verbose exit 0
npm info ok
simon@iclaw-e8a384:/tmp/codex$ codex --version
codex-cli 0.134.0
相关推荐
yonlin2 天前
【解决方案】Codex Cli 复制多行提示词到输入框,可能截断提示词,导致提示词不完整的解决方案
ai·codex
猿小猴子2 天前
主流 AGENT 实战教程「OpenCodex」与「ChatGPT Work」与「Codex Record & Replay」介绍
人工智能·ai·chatgpt·codex·minimax·deepseek·opencodex
墨心@2 天前
阶段 4:事件总线
人工智能·语言模型·大语言模型·agent·codex·harness
墨心@2 天前
阶段 1:一次模型调用
自然语言处理·nlp·agent·codex
云卷云舒___________2 天前
Anthropic披露内部模型Model 2、Codex多智能体v2委派多模型、英伟达开源550B推理教师模型 | 8月16日 AI日报
多智能体·codex·英伟达·anthropic·ai日报·model2·推理教师模型
早安试言2 天前
全流程搭建并使用codex
codex
ArkAPI4 天前
Claude Code 连发安全修复:AI 编程 Agent 的权限,正在成为新的“安全事故高发区”
人工智能·大模型·api·codex·ai工具·claude code·arkapi
Tisfy4 天前
Codex:通过编辑配置文件添加带Bearer的自定义MCP
数据库·大模型·agent·codex·mcp
花千树-0104 天前
Harness Marketplace 剖析系列 - 之 Codex:Plugin、Marketplace 与通用插件目录
codex·ai agent·skill·mcp·marketplace·ai plugin开发·智能体生态