Lazy loaded image
技术分享
Windows 安装Claude code(WSL版)
Words 140Read Time 1 min
2025-8-29
2025-8-29
网址
Caption
type
date
slug
summary
tags
category
icon
password
Post URL
Platforms
Notionsocial
Time
Likes
First Comment
Media
Views
Comments
Status
status
打开终端执行命令
报错
图片 (2635x1205)
图片 (2635x1205)
这是权限问题!在 WSL Ubuntu 中安装全局 npm 包时遇到了权限错误。

修改 npm 默认目录(推荐,避免以后的权限问题)

  1. 创建 npm 全局目录
 
  1. 配置 npm 使用新目录
 
  1. 添加到 PATH
 
  1. 重新安装 Claude Code
 

设置 API 密钥

 
然后就可以使用了:
 
 
上一篇
SSH Socks5代理配置完整教程
下一篇
打工人想要财务自由,得先改变这个思维