如何在Cabal中解决“但是给定的已安装软件包实例不存在”?

时间:2019-01-12 02:12:32

标签: haskell cabal

几天前,我使用Cabal 2.4.0.x开始了一个项目;今天早些时候,在我的工作系统上,一切进展顺利。在我的家庭系统(也安装了nixpkgs的Linux)上,它的配置与我的工作系统几乎相同(我认为没有明显的区别),事情进展也不顺利。

运行cabal new-build时,我得到以下信息:

 - http-client-tls-0.3.5.3 (lib) (requires build)
 - dhall-1.20.1 (lib) (requires build)
 - FarmDataServer-0.1.0.0 (lib) (first run)
 - FarmDataServer-0.1.0.0 (exe:FarmDataServer.exe) (first run)
Starting     data-default-instances-old-locale-0.0.1 (all, legacy fallback)
Starting     old-time-1.1.0.3 (all, legacy fallback)
Starting     asn1-types-0.3.2 (all, legacy fallback)
Starting     psqueues-0.2.7.1 (lib)
Starting     regex-base-0.93.2 (all, legacy fallback)
Building     psqueues-0.2.7.1 (lib)
Building     regex-base-0.93.2 (all, legacy fallback)
Installing   regex-base-0.93.2 (all, legacy fallback)
Completed    regex-base-0.93.2 (all, legacy fallback)
Installing   psqueues-0.2.7.1 (lib)
Completed    psqueues-0.2.7.1 (lib)

Failed to build asn1-types-0.3.2. The failure occurred during the configure
step.
Build log (
/home/brandon/.cabal/logs/ghc-8.4.4/asn1-types-0.3.2-5476450b014d99552ab51937538e1a902b669ddfc2906ba67fe8a4099016b98e.log
):
Configuring asn1-types-0.3.2...
cabal: The following package dependencies were requested
--dependency='hourglass=hourglass-0.2.12-b4e44e80db4dcca3718451012cc7a7ae0dbecf4c2012a6e72d47ff05ce4a80c4'
however the given installed package instance does not exist.


Failed to build data-default-instances-old-locale-0.0.1. The failure occurred
during the configure step.
Build log (
/home/brandon/.cabal/logs/ghc-8.4.4/data-default-instances-old-locale-0.0.1-68d07651afec351ca1382acf43ff1403a204de89c766785ea29b5eb125d7ba75
.log                                                                                                                                       
):
Configuring data-default-instances-old-locale-0.0.1...
cabal: The following package dependencies were requested
--dependency='old-locale=old-locale-1.0.0.7-876e14e8597a236e2a6f9fc9ced1be9ed8de77ad3379ae7cf45fd794315103c0'
however the given installed package instance does not exist.


Failed to build old-time-1.1.0.3. The failure occurred during the configure
step.
Build log (
/home/brandon/.cabal/logs/ghc-8.4.4/old-time-1.1.0.3-36078cb87fde3664624e1a9afd2a38b5750f797212f979be752effe1c5ef19c5.log
):
Configuring old-time-1.1.0.3...
cabal: The following package dependencies were requested
--dependency='old-locale=old-locale-1.0.0.7-876e14e8597a236e2a6f9fc9ced1be9ed8de77ad3379ae7cf45fd794315103c0'
however the given installed package instance does not exist.

cabal: Failed to build asn1-types-0.3.2 (which is required by
exe:FarmDataServer.exe from FarmDataServer-0.1.0.0). See the build log above
for details.
Failed to build data-default-instances-old-locale-0.0.1 (which is required by
exe:FarmDataServer.exe from FarmDataServer-0.1.0.0). See the build log above
for details.
Failed to build old-time-1.1.0.3 (which is required by exe:FarmDataServer.exe
from FarmDataServer-0.1.0.0). See the build log above for details.

我不确定导致错误的原因以及可能的解决方法。

更新,请参阅评论,但一种解决方法是删除~/.cabal

0 个答案:

没有答案