curl:(7)无法连接到::1:无法访问网络

2024-04-29 08:53:32 发布

您现在位置:Python中文网/ 问答频道 /正文

当我在终端中键入curl http://localhost:8000/以运行python/tornado脚本时,出现上述错误。

我的卷发版本是7.19.7。我已禁用IPV6。

My/etc/hosts读取

127.0.0.1   localhost
127.0.1.1   aniruddha-laptop

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

输出lsof | grep 8000

dbus-daem  1338  aniruddha   67u     unix 0xf2208000      0t0       8923 socket
gconfd-2   1341  aniruddha   20u     unix 0xf2ab8000      0t0       7180 socket
trashappl  1468  aniruddha   18u     unix 0xf4248000      0t0       8689 socket
notificat  1478  aniruddha   14u     unix 0xf20a8000      0t0       8613 socket

Tags: 版本脚本localhosthttp终端键入错误unix