新的 cabal 安装重复错误

New cabal install repeating error

我刚刚将完整的 Haskell 平台从 https://www.haskell.org/platform/windows.html 安装到 64 位 Windows 7 机器上。我已按照此页面的第 3 步进行操作。

我必须卸载 8.0.2 才能安装此版本,8.2.1

无论我 运行 使用 cabal 命令,现在它都会给出同样的错误。请查看以下命令和错误序列。这是在一个空目录中完成的:

D:\test>cabal init
dieVerbatim: user error (cabal: Failed to download
http://objects-us-west-1.dream.io/hackage-mirror/root.json : No Status Code
could be parsed from response: --17:29:30--
http://objects-us-west-1.dream.io/hackage-mirror/root.json
=> `C:\Users\BEN~1.CRA\AppData\Local\Temp\transportAdapterGet570528145'
Connecting to objects-us-west-1.dream.io:80... connected!
HTTP request sent, awaiting response... 200 OK
2 Content-Length: 3850
3 Accept-Ranges: bytes
4 Last-Modified: Mon, 12 Sep 2016 12:14:29 GMT
5 ETag: "c5688ef68afb3f6186d35162423bd8c6"
6 x-amz-request-id: tx0000000000000003f6055-0059e0e9ea-19c1b67c-default
7 Content-Type: application/json
8 Date: Fri, 13 Oct 2017 16:29:30 GMT
9 Connection: keep-alive
10

0K ... 100% @ 3.67 MB/s

17:29:30 (3.67 MB/s) -
`C:\Users\BEN~1.CRA\AppData\Local\Temp\transportAdapterGet570528145' saved
[3850/3850]


FINISHED --17:29:30--
Downloaded: 3,850 bytes in 1 files
)
D:\test>cabal configure
dieVerbatim: user error (cabal: Failed to download
http://objects-us-west-1.dream.io/hackage-mirror/root.json : No Status Code
could be parsed from response: --17:29:35--
http://objects-us-west-1.dream.io/hackage-mirror/root.json
=> `C:\Users\BEN~1.CRA\AppData\Local\Temp\transportAdapterGet570528145'
Connecting to objects-us-west-1.dream.io:80... connected!
HTTP request sent, awaiting response... 200 OK
2 Content-Length: 3850
3 Accept-Ranges: bytes
4 Last-Modified: Mon, 12 Sep 2016 12:14:29 GMT
5 ETag: "c5688ef68afb3f6186d35162423bd8c6"
6 x-amz-request-id: tx0000000000000001249f3-0059e0e9f0-19c8c27c-default
7 Content-Type: application/json
8 Date: Fri, 13 Oct 2017 16:29:36 GMT
9 Connection: keep-alive
10

0K ... 100% @ 3.67 MB/s

17:29:36 (3.67 MB/s) -
`C:\Users\BEN~1.CRA\AppData\Local\Temp\transportAdapterGet570528145' saved
[3850/3850]


FINISHED --17:29:36--
Downloaded: 3,850 bytes in 1 files
)
D:\test>cabal install cabal-install
dieVerbatim: user error (cabal: Failed to download
http://objects-us-west-1.dream.io/hackage-mirror/root.json : No Status Code
could be parsed from response: --17:29:45--
http://objects-us-west-1.dream.io/hackage-mirror/root.json
=> `C:\Users\BEN~1.CRA\AppData\Local\Temp\transportAdapterGet299511942'
Connecting to objects-us-west-1.dream.io:80... connected!
HTTP request sent, awaiting response... 200 OK
2 Content-Length: 3850
3 Accept-Ranges: bytes
4 Last-Modified: Mon, 12 Sep 2016 12:14:29 GMT
5 ETag: "c5688ef68afb3f6186d35162423bd8c6"
6 x-amz-request-id: tx0000000000000003f626b-0059e0e9f9-19c1b67c-default
7 Content-Type: application/json
8 Date: Fri, 13 Oct 2017 16:29:45 GMT
9 Connection: keep-alive
10

0K ... 100% @ 3.67 MB/s

17:29:45 (3.67 MB/s) -
`C:\Users\BEN~1.CRA\AppData\Local\Temp\transportAdapterGet299511942' saved
[3850/3850]


FINISHED --17:29:45--
Downloaded: 3,850 bytes in 1 files
)

它引用的临时文件不存在。我可以使用 Chrome.

从我的机器访问 dream.io

我是 Haskell/cabal 开发的新手,如果我遗漏了一些明显的东西,我深表歉意。

将正确答案重新发布为 communitywiki 以供后代使用:

https://github.com/haskell/cabal/issues/4747#issuecomment-327888643 有一些建议的解决方法,包括 cabal --http-transport=plain-http update 和 "Adding wget or curl to Path"