【Mac】安装Claude Code报错:Note: Claude Code might not be available in your country.

一、安装

https://code.claude.com/docs/zh-CN/setup

 

二、现象

 Unable to connect to Anthropic services

 Failed to connect to api.anthropic.com: ERR_BAD_REQUEST

 Please check your internet connection and network settings.

 Note: Claude Code might not be available in your country. Check supported countries at
 https://anthropic.com/supported-countries

 

三、原因

地区限制

 

四、解决方法

编辑Home目录下的.claude.json

{
  "installMethod": "unknown",
  "autoUpdates": true,
  "userID": "e16422773aa9e371129de0c39f8ebd45c0aa715fc59efe0500cd01e7c02a307f",
  "firstStartTime": "2025-12-05T06:17:30.183Z",
  "sonnet45MigrationComplete": true,
  "opus45MigrationComplete": true,
  "hasCompletedOnboarding": true  // 新增字段
}

https://blog.csdn.net/c364902709/article/details/151394810

 

当然,如果您有代理服务器,也可以配置代理

https://blog.csdn.net/flzjcsg3/article/details/149515082

 

 

参考链接:

https://blog.csdn.net/flyingcys/article/details/149312441

 

posted @ 2025-12-09 10:02  代码诠释的世界  阅读(150)  评论(0)    收藏  举报