惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

L
LangChain Blog
J
Java Code Geeks
P
Proofpoint News Feed
Recent Announcements
Recent Announcements
罗磊的独立博客
H
Hackread – Cybersecurity News, Data Breaches, AI and More
博客园_首页
Hugging Face - Blog
Hugging Face - Blog
MongoDB | Blog
MongoDB | Blog
人人都是产品经理
人人都是产品经理
博客园 - 【当耐特】
雷峰网
雷峰网
D
DataBreaches.Net
B
Blog RSS Feed
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 聂微东
V
Visual Studio Blog
Apple Machine Learning Research
Apple Machine Learning Research
N
Netflix TechBlog - Medium
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
Martin Fowler
Martin Fowler
有赞技术团队
有赞技术团队
Blog — PlanetScale
Blog — PlanetScale
Engineering at Meta
Engineering at Meta

流动

山西之旅 | 流动 博客焕新,记录继续 | 流动 友链 | 流动 博客加速实践 广府古城一日游 我做了一个口播短视频二创工具:VideoRemaker Caddy 转发 GOST 报 TLS internal error 问题的排查与解决 对口型视频合成方案对比:Wav2Lip、VideoReTalking 与 MuseTalk 2026 音色克隆方案对比:IndexTTS-2、CosyVoice、GPT-SoVITS、Fish Speech、VoxCPM 部署与实测 AI Agent折腾记(OpenClaw / Hermes Agent) 我的2025年 大连之行 回家收麦 六一儿童节爬长城 Golang database/sql 数据库断线自动重连机制解析 Golang默认Http Client导致的cannot assign requested address错误 清明踏春,爬山看海 购入小牛G400T电动车 北京的三月飞雪 wrenAI本地LLM模型部署 天津一日游 2024年终总结 停止使用staticfile.org服务 使用 ImageMagick 自动添加水印,保护图片版权 如何注册一个.sol域名 奥森公园半日游 昌平42公里骑行绿道打卡 十月一日爬慕田峪长城 当Hugo遇上AVIF,优化图片加载 博客被恶意镜像
Windows 下 Codex Cli 更新报 Move-Item is denied 错误的解决
Liudon · 2026-07-30 · via 流动

最近在 VibeCoding 一个小工具,遇到了好几次 Windows下 Codex Cli 更新失败的问题,每次都要花不少时间解决。

这次特地把问题搞清楚了,做个记录。

问题现象

Codex Cli 有版本更新,使用 Powershell 命令进行更新。

powershell -NoProfile -ExecutionPolicy Bypass -Command '$env:CODEX_NON_INTERACTIVE=1; irm https://chatgpt.com/codex/install.ps1 | iex'

执行最后报错。

==> Updating Codex CLI from 0.144.6 to 0.146.0
==> Detected platform: Windows (x64)
==> Resolved version: 0.146.0
==> Downloading Codex CLI
Move-Item : Access to the path 'C:\Users\liudon\.codex\packages\standalone\releases\.staging.0.146.0-x86_64-pc-windows-msvc.14684' is denied.
At line:1006 char:13
+             Move-Item -LiteralPath $stagingDir -Destination $releaseD ...
+             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : WriteError: (C:\Users\liudon...dows-msvc.14684:DirectoryInfo) [Move-Item], IOException
    + FullyQualifiedErrorId : MoveDirectoryItemIOError,Microsoft.PowerShell.Commands.MoveItemCommand

问题原因

看到 denied 这个错误,首先想到的是权限问题。

但我是用的管理员启动的 Powershell 终端,理论上不应该有这个问题。

经过跟 ChatGPT 一番沟通定位,最终确认是杀毒软件的防护导致的。

我本机安装了腾讯电脑管家,关闭防护后再进行更新就ok了。

# 先清理遗留文件
$releases = "$env:USERPROFILE\.codex\packages\standalone\releases"
>>
>> Get-ChildItem $releases -Force -Directory -Filter ".staging.*" |
>>     Remove-Item -Recurse -Force

# 重新进行更新
powershell -NoProfile -ExecutionPolicy Bypass -Command `
>>   '$env:CODEX_NON_INTERACTIVE=1; irm https://chatgpt.com/codex/install.ps1 | iex'
==> Updating Codex CLI from 0.144.6 to 0.146.0
==> Detected platform: Windows (x64)
==> Resolved version: 0.146.0
==> Downloading Codex CLI
==> C:\Users\liudon\AppData\Local\Programs\OpenAI\Codex\bin is already on PATH.
==> Current PowerShell session: codex
==> Future PowerShell windows: open a new PowerShell window and run: codex
Codex CLI 0.146.0 installed successfully.