How to resolve "however the given installed package instance does not exist" in Cabal?

Viewed 345

I started a project a couple of days ago using cabal 2.4.0.x; earlier today, on my work system, all was going well. On my home system, also Linux with nixpkgs installed, which is nearly identical in configuration to my work system (I can think of no obvious differences), things were not going as well.

When running cabal new-build, I get the following:

 - 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.

I'm unsure of both what is causing the error, and what a workaround might be.

Update See comment, but one workaround was to delete ~/.cabal.

0 Answers
Related