In a long time, i’m used to Hexo-all-minifier to optimization blog. But recently i can’t even install it.
The error logs with
‼ getaddrinfo ENOENT raw.githubusercontent.com ‼ gifsicle pre-build test failed i compiling from source × Error: Command failed: C:\WINDOWS\system32\cmd.exe /s /c "autoreconf -ivf" 'autoreconf' �����ڲ����ⲿ���Ҳ���ǿ����еĳ��� ���������ļ���
In the beginning, i thought the problem is my windows can’t run autoconf. So, i tried installing cygwin, And that is difficult for me. I never tried to installed cygwin.
Anyway, i installed successfully. But the problem has not solved. There is still has the errors with npm install .
The problem appeared when installing gifsicle, The Hexo-all-minifier used it too. So, the best way is go to the gifsicle issues. As predicted, there is someone got the same errors.
Be unexpected, It’s not a problem with windows or autoconf. That is network problem🌚.
‼ getaddrinfo ENOENT raw.githubusercontent.com ‼ gifsicle pre-build test failed
As in above two lines, the problem is can’t connect with
Write domain with ip into the hosts. That is best way to connect with github and other domains.
220.127.116.11 github.com 18.104.22.168 gist.github.com 22.214.171.124 api.github.com 126.96.36.199 assets-cdn.github.com 188.8.131.52 raw.githubusercontent.com 184.108.40.206 gist.githubusercontent.com 220.127.116.11 cloud.githubusercontent.com 18.104.22.168 camo.githubusercontent.com 22.214.171.124 avatars0.githubusercontent.com 126.96.36.199 avatars1.githubusercontent.com 188.8.131.52 avatars2.githubusercontent.com 184.108.40.206 avatars3.githubusercontent.com 220.127.116.11 avatars4.githubusercontent.com 18.104.22.168 avatars5.githubusercontent.com 22.214.171.124 avatars6.githubusercontent.com 126.96.36.199 avatars7.githubusercontent.com 188.8.131.52 avatars8.githubusercontent.com
npm cache clean -fand
As long as can ping with github domains, the problem will be solved.
Command failed just write some ips for hosts, then
npm install will be worked.