qemu-system-x86_64 :地址解析失败 ::1:46189:名称或服务未知

2023-11-22

我有以下问题。当我跑步时emulator @avdname抛出以下错误:

(...)
qemu-system-x86_64: -chardev socket,port=46189,host=::1,nowait,nodelay,ipv6,id=modem: address resolution failed for ::1:46189: Name or service not known
(...)

我试图在互联网上找到解决方案(here and here)但仍然没有成功。

/etc/hosts 文件

127.0.0.1   localhost
127.0.1.1   luis-HP-ProBook-450-G2

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

我不知道是什么原因造成的,但遵循以下建议https://issuetracker.google.com/issues/215231636,我可以确认关闭 IPv6 完全解决了我的问题。

暂时的:sysctl net.ipv6.conf.all.disable_ipv6=1

永久设置:放置net.ipv6.conf.all.disable_ipv6=1 in /etc/sysctl.conf or in /etc/sysctl.d/99-sysctl.conf(以您的系统中正确的方式为准)。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

qemu-system-x86_64 :地址解析失败 ::1:46189:名称或服务未知 的相关文章