haskell - 无法阴谋集团安装 hunit
问题描述
这里的 Haskell 生态系统非常新。我正在尝试安装 hunit,但是当我运行时,cabal install hunit
我收到以下消息:
Warning: The install command is a part of the legacy v1 style of cabal usage.
Please switch to using either the new project style and the new-install
command or the legacy v1-install alias as new-style projects will become the
default in the next version of cabal-install. Please file a bug if you cannot
replicate a working v1- use case with the new-style commands.
For more information, see: https://wiki.haskell.org/Cabal/NewBuild
cabal: There is no package named 'hunit'. However, the following package name
exists: 'HUnit'.
解决方案
此消息告诉您两件不同的事情。“安装”是旧命令,“hunit”不存在。
您的简短解决方案是cabal v2-install --lib HUnit
. 对于遗留行为,请考虑cabal v1-install HUnit
.
install is legacy: 大段
Cabal 过去将所有内容安装到单个商店中,无论是用户范围还是系统范围,如果任何软件包在软件包版本上存在分歧,那么祝你好运。v2 命令移至“nix 样式构建”,其中不同版本可以在商店中共存,项目可以通过共享通用包的构建继续受益。v2 命令实际上是带有前缀的命令v2-
,例如v2-install
,v2-build
和v2-configure
。
hunit 不存在
Hackage 区分大小写。该工具已经通知您,您可能打算安装HUnit
而不是hunit
.
结语:使用--lib
v2-install
除非通过--lib
. 这减少了一些需要重新培训的昂贵程序员的命名空间混乱。要将 HUnit 用作库并在 repl 中使用它,请--lib
按开头所示添加。
推荐阅读
- ruby-on-rails - 将临时站点部署到 AWS
- php - 给定 [address] 邮箱中的地址不符合 RFC 2822, 3.6.2
- reactjs - 过滤
- 通过自定义参数
- php - laravel 6.x 版本如何重定向不同用户查看不同页面
- c++ - mimalloc 推荐选项
- abap - OpenSQL中GROUP BY子句中的通配符?
- node.js - 我是否应该在本地计算机中拥有与我要部署到的环境版本相同的节点(例如:Firebase Cloud Functions)?
- php - 回答回调查询
- python - Python beatifulSoup2 从 XML 中提取多个标签
- html - 如何使用 VBA 缩进 HTML?