Failed to update cabal-install on a fresh Arch Linux installation
Created by: zhangkaizhao
On a fresh Arch Linux installation, I'm following the instruction in README:
# install the last known "best" GHC version
ghcup install
# install a specific GHC version
ghcup install 8.2.2
# set the currently "active" GHC version
ghcup set 8.4.4
# install cabal-install
ghcup install-cabal
# update cabal-install
cabal new-install cabal-install
And there is an error raised while processing the last command line task:
$ cabal new-install cabal-install
cabal: ghc-pkg dump failed: dieVerbatim: user error (cabal:
'/home/kaizhao/.ghcup/bin/ghc-pkg' exited with an error:
ghc-pkg: /home/kaizhao/.cabal/store/ghc-8.4.4/package.db:
getDirectoryContents:openDirStream: does not exist (No such file or directory)
)
$
The error insists after running the cabal new-update
command to download the latest package list.
Tree of directories and files in ~/.cabal
:
$ tree .cabal/
.cabal/
├── bin
├── config
└── packages
└── hackage.haskell.org
├── 01-index.cache
├── 01-index.tar
├── 01-index.tar.gz
├── 01-index.tar.idx
├── 01-index.timestamp
├── hackage-security-lock
├── mirrors.json
├── root.json
├── snapshot.json
└── timestamp.json
3 directories, 11 files