← 返回问题库
问题库安装与认证CLI入门

为什么安装的 Codex 版本和 codex --version 不一致?

常见原因是 PATH 中存在多个安装来源、shell 缓存或包管理器仍指向旧二进制。

5 分钟阅读核验于 2026/07/21

确认实际二进制

使用 shell 的路径查询命令查看 codex 来自哪里,同时检查 npm、Homebrew 和手动下载是否并存。

清理后验证

关闭并重开终端,运行 codex --version,并与官方稳定 Release 对照;不要盲目删除未知目录。

参考来源

优先使用 OpenAI 官方文档与官方仓库。外部来源会单独标识。

  1. OpenAI Codex Quickstart

    官方来源 · https://learn.chatgpt.com/docs/quickstart

  2. openai/codex 官方仓库

    官方来源 · https://github.com/openai/codex

  3. openai/codex Issue #19110:Codex CLI version bug

    外部公开来源 · https://github.com/openai/codex/issues/19110

codex.study 是独立运营的中文 Codex 学习与资料平台,与 OpenAI 不存在隶属、授权或官方认证关系。