我一直无法使用Cabal安装任何软件包,出现错误提示tar归档文件不在预期的目录中。例如,如果我尝试这样做,cabal install mtl
,我得到以下错误:Cabal:tar归档中的文件不在预期的目录中
Resolving dependencies... Failed to install text-1.2.1.1 cabal: Error: some packages failed to install: text-1.2.1.1 failed while unpacking the package. The exception was: user error (File in tar archive is not in the expected directory. Expected: "." but got the following hierarchy: ["text-1.2.1.1"])
我已经运行cabal update
和cabal --version
给出如下:
$ cabal --version
cabal-install version 1.22.5.0
using version 1.22.4.0 of the Cabal library
任何人有任何想法,为什么这可能会发生?如果您需要任何其他信息,请告知我。
是的,就是这样。任何其他有类似问题的人都需要从[这里](https://www.haskell.org/cabal/download.html)下载cabal的源代码。做'cabal安装cabal-install'最终会给你我在我的问题中提到的同样的错误。谢谢 – Matt
版本1.22.9为我工作,谢谢。 –