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

推荐订阅源

Microsoft Azure Blog
Microsoft Azure Blog
Engineering at Meta
Engineering at Meta
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
F
Fortinet All Blogs
博客园 - 叶小钗
T
Tailwind CSS Blog
Security Archives - TechRepublic
Security Archives - TechRepublic
T
The Exploit Database - CXSecurity.com
Blog — PlanetScale
Blog — PlanetScale
T
Tenable Blog
人人都是产品经理
人人都是产品经理
D
DataBreaches.Net
A
Arctic Wolf
P
Proofpoint News Feed
S
SegmentFault 最新的问题
C
CERT Recently Published Vulnerability Notes
T
Threatpost
Y
Y Combinator Blog
WordPress大学
WordPress大学
L
LINUX DO - 热门话题
酷 壳 – CoolShell
酷 壳 – CoolShell
V
Vulnerabilities – Threatpost
AWS News Blog
AWS News Blog
小众软件
小众软件
U
Unit 42
云风的 BLOG
云风的 BLOG
美团技术团队
S
Securelist
C
Cybersecurity and Infrastructure Security Agency CISA
L
LangChain Blog
G
GRAHAM CLULEY
P
Proofpoint News Feed
I
Intezer
Security Latest
Security Latest
L
Lohrmann on Cybersecurity
NISL@THU
NISL@THU
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
The Hacker News
The Hacker News
Cisco Talos Blog
Cisco Talos Blog
T
The Blog of Author Tim Ferriss
H
Heimdal Security Blog
T
Tor Project blog
MongoDB | Blog
MongoDB | Blog
The Cloudflare Blog
T
Troy Hunt's Blog
Know Your Adversary
Know Your Adversary
博客园 - 司徒正美
Google Online Security Blog
Google Online Security Blog
V
V2EX
Application and Cybersecurity Blog
Application and Cybersecurity Blog

虹墨空间站

浏览器直接访问正常,过了负载均衡就崩了?只因响应头里多了个空格 Claude Code 怎样快速消耗 token 去掉高德地图开屏广告 Windows 11 26H1 显示所有托盘图标 OpenClaw 安装与配置 盘点手里的电子产品传家宝 基于 7z 的 NAS 到网盘备份解决方案,支持增量、分卷、加密、压缩 卸载百度网盘智能看图 CDN 方式引入 Monaco Editor 在线工具 - 富文本转 Markdown 2025 年了,安卓平板上什么第三方九键输入法最好用? 鸿蒙 PC 编译运行 Electron 应用 bat 脚本打印输出彩色文字 Android 强制锁定屏幕旋转方向
解决 Claude Code 安装或更新后 claude.exe 无法运行、claude native binary not installed
iMaeGoo · 2026-04-20 · via 虹墨空间站

今天在 Windows 或 macOS 上安装或更新 Claude Code 后,运行 claude 命令却报错 claude native binary not installed(macOS)、程序 claude.exe 无法运行(Windows)。折腾了一番终于搞清楚了原因。

原因分析

Claude Code 自 2.1.113 版本开始改为分发二进制包,不再分发 JS 源码。

用 npm 安装 claude 时,它会通过 optionalDependencies 来安装不同平台的二进制包。

1
2
3
4
5
6
7
8
9
10
"optionalDependencies": {
"@anthropic-ai/claude-code-darwin-arm64": "2.1.114",
"@anthropic-ai/claude-code-darwin-x64": "2.1.114",
"@anthropic-ai/claude-code-linux-x64": "2.1.114",
"@anthropic-ai/claude-code-linux-arm64": "2.1.114",
"@anthropic-ai/claude-code-linux-x64-musl": "2.1.114",
"@anthropic-ai/claude-code-linux-arm64-musl": "2.1.114",
"@anthropic-ai/claude-code-win32-x64": "2.1.114",
"@anthropic-ai/claude-code-win32-arm64": "2.1.114"
},

然而 Windows 平台的二进制包有足足 234MB 大,国内常用的阿里 npm 镜像站(https://npmmirror.com)默认不会同步这种巨大的 npm 包,导致找不到该包。

为什么阿里不同步巨型包?我猜跟 24 年的这次事件有关——《庆余年2》遭遇“开源”盗版,npm社区“被迫”暂停服务

又因为 optionalDependencies 是可选依赖,npm 在安装时不会报任何错误,看起来安装成功了,实则二进制文件根本没有装上。

解决方案

安装时指定强制从官方 npm 源下载即可:

1
npm install -g @anthropic-ai/claude-code --registry=https://registry.npmjs.org

或者不安装最新版,安装最后一个使用 js 的版本:

1
npm install -g @anthropic-ai/claude-code@2.1.112