我一直無法使用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爲我工作,謝謝。 –