[英]Cabal configure in a sandbox complains “At least the following dependencies are missing” on installed packages
I have a project, it's inside a sandbox, I introduced a test-suite in my cabal file and it build-depends
on hunit ==1.2.*
. 我有一个项目,它在沙箱中,我在我的cabal文件中引入了一个测试套件并且它
build-depends
hunit ==1.2.*
。 The problem is when I try to configure: 问题是当我尝试配置时:
$ cabal configure --enable-tests
$ cabal configure --enable-tests
Resolving dependencies...解决依赖关系......
Configuring MyProject-0.1.0.0...配置MyProject-0.1.0.0 ...
cabal: At least the following dependencies are missing:cabal:至少缺少以下依赖项:
hunit ==1.2.*hunit == 1.2。*
A few more attempts to get it to come around: 还有一些尝试让它出现:
$ cabal install --dependencies-only
$ cabal install - 仅限依赖项
Resolving dependencies...解决依赖关系......
All the requested packages are already installed:已安装所有请求的包:
Use --reinstall if you want to reinstall anyway.如果要重新安装,请使用--reinstall。
& &
$ cabal install hunit
$ cabal安装hunit
Resolving dependencies...解决依赖关系......
All the requested packages are already installed:已安装所有请求的包:
HUnit-1.2.5.2HUnit-1.2.5.2
Use --reinstall if you want to reinstall anyway.如果要重新安装,请使用--reinstall。
& &
$ cabal install --enable-tests
$ cabal install --enable-tests
Resolving dependencies...解决依赖关系......
cabal: Could not resolve dependencies:cabal:无法解析依赖项:
trying: MyProject-0.1.0.0 (user goal)尝试:MyProject-0.1.0.0(用户目标)
rejecting: MyProject-0.1.0.0:!test (global constraint requires opposite flag selection)拒绝:MyProject-0.1.0.0:!test(全局约束需要相反的标志选择)
trying: MyProject-0.1.0.0:*test尝试:MyProject-0.1.0.0:*测试
next goal: hunit (dependency of MyProject-0.1.0.0:*test)下一个目标:hunit(MyProject-0.1.0.0的依赖:*测试)
fail (unknown package: hunit)失败(未知包裹:hunit)
Dependency tree exhaustively searched.完全搜索依赖树。
--reinstall
ing did nothing. --reinstall
ing什么也没做。
I even played with the --user
and --global
flags, even tho I'm using cabal
and not runhaskell
, it doesn't help it. 我甚至玩
--user
和--global
标志,即使我使用cabal
而不是runhaskell
,它也无济于事。
I also tried to delete
& re- init
the sandbox. 我还试图
delete
并重新init
沙箱。
I tried just delete
ing the sandbox too, and it still gave me the same error. 我也试过
delete
沙盒,它仍然给了我同样的错误。
ghc-pkg check
finds nothing wrong. ghc-pkg check
发现没有错。
What could it be? 会是什么呢?
By the way a part of me is suspicious that cabal ignores that my project is in a sandbox, since it didn't bother to install some packages that were already on my machine; 顺便说一下,我的一部分人怀疑cabal忽略了我的项目是在沙盒中,因为它没有打扰安装我机器上已有的一些软件包; it does so on my Windows (this is on Ubuntu).
它在我的Windows上运行(这是在Ubuntu上)。 Is it possible to get that checked?
是否可以检查?
Ubuntu 14.04.1 LTS Ubuntu 14.04.1 LTS
GHC version: 7.6.3 GHC版本:7.6.3
cabal-install version: 1.20.0.3 cabal-install版本:1.20.0.3
Cabal library version: 1.20.0.2 Cabal库版本:1.20.0.2
Also tried now with cabal-install 1.16.0.2 without success. 现在还尝试使用cabal-install 1.16.0.2但没有成功。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.