Go couldn't start listener listen tcp lookup localhost no such host
使用GoLang进行debug时, 报了这么个错couldn't start listener: listen tcp: lookup localhost: no such host
其实很简单,是因为本地的hosts
文件少配置了127.0.0.1 localhost
为什么少了这行配置?可能是其他开发时切换了hosts配置而刚好那个配置没有加这一行
添加这一行后如果没有生效,记得清一下缓存
(hugo的文章标题竟然不能带标点符号:
…)
End…
- 原文作者:许杨淼淼
- 原文链接:https://blog.xu42.com/2018/09/13/golang-debug-could-not-start-listener-listen-tcp-lookup-localhost/
- 版权声明:本作品采用知识共享署名-非商业性使用-禁止演绎 4.0 国际许可协议进行许可,非商业转载请注明出处(作者,原文链接),商业转载请联系作者获得授权。