ubuntu@ubuntu:~$ npm install -g yarn
npm ERR! code EHOSTUNREACH
npm ERR! errno EHOSTUNREACH
npm ERR! request to http://registry.npmjs.ord/yarn failed, reason: connect EHOSTUNREACH 104.16.22.35:80
我已经阅读了关于这个错误的所有其他链接,而我有三个因素与它们所有人都不同,它们非常重要,因为它们是解决其他人问题的解决方案。我已经阅读过但未解决问题的链接:
- 如何解决npm安装问题?
- Node API出现错误:EHOSTUNREACH
- https://groups.google.com/g/node-red/c/RVcv2GgO_Fw?pli=1
- https://stackabuse.com/npm-error-failed-to-fetch-from-registry-when-installing-module/
- https://discourse.nodered.org/t/node-installing-issue/50540/3
- 尝试安装任何模块时出现“无法从注册表获取消息”
- https://github.com/npm/npm/issues/16098
- https://discourse.nodered.org/t/error-while-installing-dashboard-on-raspberry-pi/19291
- https://groups.google.com/g/node-red/c/RVcv2GgO_Fw
- https://www.ibm.com/docs/en/cloud-private/3.2.x?topic=tap-cloud-foundry-application-deployment-fails-due-ehostunreach-error
- https://forums.raspberrypi.com/viewtopic.php?t=61930
- https://www.codegrepper.com/code-examples/whatever/linux+redis+connect+EHOSTUNREACH
- https://forum.ghost.org/t/second-site-on-raspberry-pi-econnrefused/1230
- https://github.com/npm/npm/issues/6820
- https://github.com/npm/npm/issues/5553
- npm ERR!错误:连接ECONNREFUSED
- 无法在树莓派上安装npm模块
- https://githubmemory.com/repo/nicoduj/homebridge-harmony/issues/290
- https://discourse.nodered.org/t/node-installing-issue/50540
我仍在苦苦挣扎。
- 互联网稳定并正常工作
- 我可以ping通
registry.npmjs.org
和其他网站 - registry.npmjs.org没有指向本地地址
我尝试清除代理设置,但我没有要尝试的代理设置,如果需要的话,我不知道该放什么(但考虑到如何清除它的指南,它们不是必需的)。我不知道要尝试什么,因为所有其他实例的解决方案都不适用于我。
Ubuntu 20.04.3 for Raspberry Pi