Error: getaddrinfo ENOENT raw.githubusercontent.com 无法访问

在使用npm安装依赖时,报如下错误:

9895 error compiling from source
9896 error getaddrinfo ENOENT raw.githubusercontent.com
9896 error gifsicle pre-build test failed
9896 error Error: Command failed: C:\Windows\system32\cmd.exe /s /c "autoreconf -ivf"
9896 error 'autoreconf' �����ڲ����ⲿ���Ҳ���ǿ����еij���
9896 error ���������ļ���
9896 error
9896 error

原因分析:

无法解析raw.githubusercontent.com地址,需要FQ或者配置本地host文件

解决方法:
查看raw.githubusercontent.com的真实IP地址,打开 https://site.ip138.com/raw.Githubusercontent.com/ 查看下面的IP,复制一个,ping一下看下通不通,不通就用下面其它的ping ,通了才能用。

 

 

 

修改C:\Windows\System32\drivers\etc\hosts,把复制的IP添加进去,保存

1
185.199.111.133 raw.githubusercontent.com

  

 

posted @   猪脚踏浪  阅读(1996)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 10年+ .NET Coder 心语 ── 封装的思维:从隐藏、稳定开始理解其本质意义
· 地球OL攻略 —— 某应届生求职总结
· 提示词工程——AI应用必不可少的技术
· 字符编码:从基础到乱码解决
· Open-Sora 2.0 重磅开源!
点击右上角即可分享
微信分享提示