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
相关推荐
JaguarJack1 天前
Openai Codex 重大更新 已支持接入任意开源大模型
ai·openai·codex
侯垒2 天前
我让 Claude 写了一个贪吃蛇游戏,然后用 ccglass 看清它发给模型的真实请求
claude·codex·ccglass
m0_718677492 天前
Codex+Game studio:做游戏的好工具
codex
-星空下无敌2 天前
Skills详解(2万字详细教程),Skills是什么,如何安装并使用Skills
人工智能·ai·提示词·codex·mcp·skills·agent skills
本人手速666+3 天前
Codex安装适配国产信创环境的
个人开发·codex
小七-七牛开发者3 天前
周一上线|瑞幸把咖啡做进 CLI,Fable 5 短暂登场,Stonk Rider 骑上 K 线图
ai·chatgpt·大模型·agent·claude·codex·skill·claudecode·ai coding
小七-七牛开发者4 天前
Codex 实践系列 Vol.02:让 Codex 读懂开源项目 Typer
ai·chatgpt·openai·agent·工作流·codex·skill·ai coding
Watink Cpper4 天前
VSCode通过ChatGPT5.5登陆codex:sign-in could not be complete 问题解决方案
ide·vscode·编辑器·codex·gpt5.5
xiezhr4 天前
Hermes官方桌面版发布了
人工智能·ai·agent·codex·hermes
小码农叔叔4 天前
【AI智能体】Codex AI 辅助编程高级技能实战操作详解
codex·codex 编程·codex 编程技巧·codex 编程实战·codex 编程详解·codex 编程实战详解