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
.
解决方案
推荐阅读
- php - laravel 5.5 - 未定义的变量:@foreach 循环中的产品
- java - 如何将过滤后的流数组输出收集为列表
- android - 方向键导航不会转到下一个焦点项目
- apache - 如何使用 Docker 容器在前端和后端之间进行 REST 调用
- excel - 显示已在 Excel 中筛选的列标题
- pandas - PySpark:将 Spark Dataframe 转换为 Pandas Dataframe [.toPandas() 的替代方案]
- javascript - 添加空项不会创建值属性
- angular - 为什么我得到“@angular/material@5.2.0”的对等依赖不正确“@angular/cdk@5.2.0”
- c# - 动态构建实体框架 Linq to SQL 查询
- html-table - ngIf 块正在加载几秒钟然后隐藏