我试图从源代码构建python。 DurringPython编译失败
$make test
此错误出现并导致构建失败。
====================================================================== ERROR: test_idna (test.test_socket.GeneralModuleTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/h/Downloads/Python-3.4.2/Lib/test/test_socket.py", line 1287, in test_idna socket.gethostbyname('испытание.python.org') socket.gaierror: [Errno -5] No address associated with hostname
---------------------------------------------------------------------- Ran 506 tests in 150.098s
FAILED (errors=1, skipped=24) test test_socket failed make: *** [test] Error 1
我通过在python源文件中使用俄罗斯URL进行了描绘。被黑客攻击了吗? 这是什么?它翻译成ispytanie.python.org 但我仍然不知道为什么它那里。
更新: http://ispytanie.python.org/ 俄语页面的翻译页面不再有效。 任何遵循Linux安装说明的人,运行$ make test 都可能会遇到此错误。
它可能要么测试gethostbyname支持unicode?或者假设有这样一个服务器总是在运行,所以测试总是会通过(目前我没有看到)。尝试摆弄代码。首先尝试“www.python.org”导致这种情况发生。然后尝试一些unicode主机,看看是否有效。它会给你更多的信息。 – 2014-11-23 05:16:21