haskell / haskell/cabal

Error: Could not read index. Did you call 'checkForUpdates'?

Open
#5,574 21 comments 0 reactions 0 assignees View on GitHub
cabal-install: cmd/update can-workaround type: bug
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

This seems like something aimed at users of cabal-the-library and gives zero indication on how to fix this.

```
Andi@Horzube MINGW64 ~/hc_bench/libs/binary/c_allCalls
$ cabal --version
cabal-install version 2.5.0.0
compiled using version 2.5.0.0 of the Cabal library

Andi@Horzube MINGW64 ~/hc_bench/libs/binary/c_allCalls
$ cabal new-update
Downloading the latest package lists from:
- hackage.haskell.org
- head.hackage
cabal.exe: Could not read index. Did you call 'checkForUpdates'?

Andi@Horzube MINGW64 ~/hc_bench/libs/binary/c_allCalls
$ cabal new-update
Downloading the latest package lists from:
- hackage.haskell.org
- head.hackage
cabal.exe: Could not read index. Did you call 'checkForUpdates'?
```
It's rare enough that I don't mind it (that much). But it's not the first time I've run into this issue so

At least the error should give an indication on how to get cabal working again.
Eg deleting the local cabal folder fixed the issue.

---
**edit by @23Skidoo:** Current workaround is to delete the `01-index.*` files and retry `cabal update`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.