easy_install ReviewBoard [错误 104] 连接被重置

1 投票
2 回答
4349 浏览
提问于 2025-04-15 23:44

我有一个Kubuntu 10.04的虚拟机镜像,正在尝试按照Linux安装维基上的步骤来安装ReviewBoard。当我到达easy_install ReviewBoard这一步时,遇到了一个我找不到解决办法的问题。下面是控制台输出的内容:

>> sudo easy_install ReviewBoard
Searching for ReviewBoard
Best match: ReviewBoard 1.0.8
Processing ReviewBoard-1.0.8-py2.6.egg
ReviewBoard 1.0.8 is already the active version in easy-install.pth
Installing rb-site script to /usr/local/bin

Using /usr/local/lib/python2.6/dist-packages/ReviewBoard-1.0.8-py2.6.egg
Processing dependencies for ReviewBoard
Searching for pytz
Reading http://downloads.reviewboard.org/mirror/
Download error: [Errno 104] Connection reset by peer -- Some packages may not be found!
Reading http://downloads.reviewboard.org/releases/ReviewBoard/1.0/
Download error: [Errno 104] Connection reset by peer -- Some packages may not be found!
Reading http://pypi.python.org/simple/pytz/
Download error: [Errno 104] Connection reset by peer -- Some packages may not be found!
Reading http://pypi.python.org/simple/pytz/
Download error: [Errno 104] Connection reset by peer -- Some packages may not be found!
Couldn't find index page for 'pytz' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading http://pypi.python.org/simple/
Download error: [Errno 104] Connection reset by peer -- Some packages may not be found!
No local packages or download links found for pytz
error: Could not find suitable distribution for Requirement.parse('pytz')

我对python还不太熟悉,但看起来easy_install无法决定使用哪个版本的pytz。我阅读了以下内容:

这些文章中描述的问题似乎与开发有关,而不是我的问题,但我可能错了。

有没有人遇到过类似的问题?如果有任何缺失的信息可以帮助解决这个问题,请告诉我。

@Ben Hoffstein

Settings for eth0:
        Supported ports: [ TP ]
        Supported link modes:   10baseT/Half 10baseT/Full 
                                100baseT/Half 100baseT/Full 
                                1000baseT/Full 
        Supports auto-negotiation: Yes
        Advertised link modes:  10baseT/Half 10baseT/Full 
                                100baseT/Half 100baseT/Full 
                                1000baseT/Full 
        Advertised pause frame use: No
        Advertised auto-negotiation: Yes
        Link partner advertised link modes:  Not reported
        Link partner advertised pause frame use: No
        Link partner advertised auto-negotiation: No
        Speed: 1000Mb/s
        Duplex: Full
        Port: Twisted Pair
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: on
        MDI-X: Unknown
        Supports Wake-on: d
        Wake-on: d
        Current message level: 0x00000007 (7)
        Link detected: yes

编辑: 我不确定这是否会提供更多有用的信息,但我尝试安装Trac的git插件时也遇到了同样的问题。所以,看起来可能是easy_install本身的问题。

>> sudo easy_install http://trac-hacks.org/svn/gitplugin/0.11
Downloading http://trac-hacks.org/svn/gitplugin/0.11
error: Download error for http://trac-hacks.org/svn/gitplugin/0.11: [Errno 104] Connection reset by peer

2 个回答

0

就像 @Tarantula 说的,这只是一个临时的 pypi 服务问题,我昨天也遇到了同样的情况。我试着 ping 了一下 pypi.python.org(或者用 dighost),发现 DNS 服务器返回了两个服务器的地址。问题出在其中一个 pypi 服务器上,它在处理某个 Python 包的请求时总是报错。

所以我在 /etc/hosts 文件里硬编码了 pypi.python.org 的映射,把它强制指向了我想要的那个服务器,这样就解决了我的问题。当然,这只是一个临时的解决办法,因为我们无法控制外部服务。

# add a line to /etc/hosts
151.101.200.223 pypi.python.org

等服务恢复正常后,记得把这一行删掉。

2

这可能是PyPI主机的临时问题,稍后再试一下:easy_install pytz

撰写回答