haskell - cabal 更新: Local and remote files match

标签 haskell ghc cabal

当我尝试 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 更新 -v3 日志:

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.

我的 Cabal 版本是 1.20.0.2

配置文件看起来像 https://gist.github.com/anonymous/fda74fa01d3113e0aeab

堆栈溢出令人烦恼地拒绝了我的编辑,因为日志中的代码太多,所以我在这里添加一些垃圾以使其通过......

最佳答案

也许您删除了.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 会得到你解脱了。

关于haskell - cabal 更新: Local and remote files match,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30982195/

相关文章:

haskell - monad 中的 FoldlWithKey

haskell - 为什么这个 Haskell 程序在优化编译时会泄漏空间?

haskell - 一个目录中有多个 Haskell cabal-packages

haskell - [do x] 和 [do return x] 何时评估不同?

haskell - GHC 7.6 中类型级别 Nat 的匹配

haskell - 如何在 Haskell 中表达以下 if-else if-else 语句?

haskell - do-notation 是特定于 "base:GHC.Base.Monad"的吗?

haskell - GHC 链接问题

haskell - `cabal update` 由于 `out of memory` 而失败

haskell - 根据依赖版本的不同导入