@Star5TAR 在 ubuntu20.04使用claude code出现的报错claude code unable to connect to api(EAI AGIAN)解决方案 中发帖
ubuntu20.04系统,clash-verge开了TUN(似乎在ubuntu20.04下clash-verge不太稳定),在使用claude code时候依旧经常出现报错claude code unable to connect to api(EAI AGIAN)
查了一下应该是DNS相关的问题,自己找了一些解决方案,到现在为止暂时还有效,贴出来给遇到类似问题的佬友们参考一下,欢迎大佬批评指正
对于CLI的cc,可以gedit ~/.bashrc,在末尾添加:
export proxy_port=7897(这个地方填入你自己的端口)
export http_proxy=“http://127.0.0.1:$proxy_port”
export https_proxy=“http://127.0.0.1:$proxy_port”
export all_proxy=“socks...