当我尝试更新cabal时,我得到:
Downloading the latest package list from hackage.haskell.org
Skipping download: Local and remote files match.
Warning: The package list for 'hackage.haskell.org' does not exist. Run 'cabal
update' to download it.
我已经运行了cabal init
cabal update -v3 log:
Downloading the latest package list from hackage.haskell.org
Sending:
GET /packages/archive/00-index.tar.gz HTTP/1.1
Host: hackage.haskell.org
User-Agent: cabal-install/1.20.0.3 (linux; x86_64)
If-None-Match: "cb3a8478c33cbfb51929818cc8da736d"
Creating new connection to hackage.haskell.org
Received:
HTTP/1.1 301 Moved Permanently
Server: nginx/1.6.2
Content-Type: text/plain; charset=UTF-8
Location: /packages/index.tar.gz
Transfer-Encoding: chunked
Accept-Ranges: bytes
Date: Mon, 22 Jun 2015 16:32:03 GMT
Via: 1.1 varnish
Age: 0
Connection: keep-alive
X-Served-By: cache-jfk1025-JFK
X-Cache: MISS
X-Cache-Hits: 0
X-Timer: S1434990722.961771,VS0,VE54
Content-Length: 0
301 - redirect
Redirecting to http://hackage.haskell.org/packages/index.tar.gz ...
Sending:
GET /packages/index.tar.gz HTTP/1.1
Host: hackage.haskell.org
User-Agent: cabal-install/1.20.0.3 (linux; x86_64)
If-None-Match: "cb3a8478c33cbfb51929818cc8da736d"
Recovering connection to hackage.haskell.org
Received:
HTTP/1.1 304 Not Modified
Date: Mon, 22 Jun 2015 16:32:03 GMT
Via: 1.1 varnish
Cache-Control: public, no-transform, max-age=300
ETag: "cb3a8478c33cbfb51929818cc8da736d"
Age: 0
Connection: keep-alive
X-Served-By: cache-jfk1025-JFK
X-Cache: HIT
X-Cache-Hits: 1
X-Timer: S1434990723.030149,VS0,VE145
Skipping download: Local and remote files match.
Reading available packages...
Warning: The package list for 'hackage.haskell.org' does not exist. Run
'cabal update' to download it.
My Cabal版本为1.20.0.2
配置文件看起来像https://gist.github.com/anonymous/fda74fa01d3113e0aeab
堆栈溢出是令人讨厌地拒绝我的编辑,因为日志中的代码太多所以我在这里添加一些垃圾以使其通过...答案 0 :(得分:4)
也许您删除了.cabal/packages/hackage.haskell.org/00-index.tar
,但没有删除.cabal/packages/hackage.haskell.org/00-index.tar.gz.etag
。我可以通过这样做重现你看到的行为。
可能cabal应该更聪明地处理这种情况,但无论如何我认为删除.cabal/packages/hackage.haskell.org/00-index.tar.gz.etag
会让你失败。