Haskell 安装光泽度和其他带有暗室的包装

Haskell 安装光泽度和其他带有暗室的包装,haskell,cabal,cabal-install,modulenotfounderror,gloss,Haskell,Cabal,Cabal Install,Modulenotfounderror,Gloss,我正在尝试安装gloss,但我不知道为什么ghci找不到模块 当我做阴谋时,它说: Up to date Warning: You asked to install executables, but there are no executables in target: gloss. Perhaps you want to use --lib to install libraries instead. 当我执行cabal安装-lib gloss时,会出现以下错误: Resolving depe

我正在尝试安装gloss,但我不知道为什么ghci找不到模块

当我做阴谋时,它说:

Up to date
Warning: You asked to install executables, but there are no executables in
target: gloss. Perhaps you want to use --lib to install libraries instead.
当我执行cabal安装-lib gloss时,会出现以下错误:

Resolving dependencies...
cabal.exe: Could not resolve dependencies:
[__0] trying: bytestring-0.11.0.0 (user goal)
[__1] next goal: directory (user goal)
[__1] rejecting: directory-1.3.6.1 (constraint from user target requires
==1.3.6.0)
[__1] trying: directory-1.3.6.0/installed-1.3.6.0
[__2] next goal: Win32 (dependency of directory)
[__2] rejecting: Win32-2.6.1.0/installed-2.6.1.0 (conflict:
bytestring==0.11.0.0, Win32 => bytestring==0.10.10.0/installed-0.10.10.0)
[__2] rejecting: Win32-2.10.1.0, Win32-2.10.0.0, Win32-2.9.0.0, Win32-2.8.5.0,
Win32-2.8.4.0, Win32-2.8.3.0, Win32-2.8.2.0, Win32-2.8.1.0, Win32-2.8.0.0,
Win32-2.7.0.0, Win32-2.6.2.0, Win32-2.6.1.0, Win32-2.6.0.0, Win32-2.5.4.1,
Win32-2.5.3.0, Win32-2.5.2.0, Win32-2.5.1.0, Win32-2.5.0.0, Win32-2.4.0.0,
Win32-2.3.1.1, Win32-2.3.1.0, Win32-2.3.0.2, Win32-2.3.0.1, Win32-2.3.0.0,
Win32-2.2.2.0, Win32-2.2.1.0, Win32-2.2.0.2, Win32-2.2.0.1, Win32-2.2.0.0,
Win32-2.1.0.0, Win32-2.1, Win32-2.5.4.0 (conflict: directory =>
Win32==2.6.1.0/installed-2.6.1.0)
[__2] fail (backjumping, conflict set: Win32, bytestring, directory)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: ghc, bytestring, Win32, directory
Try running with --minimize-conflict-set to improve the error message.
这很奇怪,因为我第一次使用这个命令时,它工作得很好,但当我尝试在ghci´´´´´´´´´´´´´´导入时,它说:找不到模块

我尝试了其他模块,它给了我同样的错误。我认为问题可能是ghc无法在保存包的cabal文件夹中搜索,但我不再确定


我怎样才能解决这个问题?谢谢

这个问题太模糊了,无法用这种形式回答,而且过去有很多非常类似的问题,可能会解决您的问题。我的建议是:永远不要安装任何软件包。相反,在本地项目中依赖它们,然后使用
cabal repl
(或
stack ghci
),它会自动安装所需的任何东西。嘿,谢谢你的帮助。问题是,我不知道如何使它更具体,因为这是我得到的唯一错误。我还没有找到一个可以解决我的问题的解决方案。很抱歉打扰大家,但我对编程还比较陌生。当你说在本地依赖它们时,你的确切意思是什么?我的意思是你应该创建一个小的虚拟阴谋集团项目(这可以通过
cabalinit
在一个新目录中创建,其中只有一个
.hs
文件)。然后,在
PROJECTNAME.cabal
文件中,在
build dependens
下列出您需要的包,您将能够导入
.hs
文件中的任何模块。然后可以使用
cabel repl
加载该文件,这与
ghci
类似,只是您需要的所有导入都已处理完毕。非常感谢!!!我一定会这样做。这个问题太模糊了,无法用这种形式回答。不管怎样,过去有很多非常类似的问题,可能会解决你的问题。我的建议是:永远不要安装任何软件包。相反,在本地项目中依赖它们,然后使用
cabal repl
(或
stack ghci
),它会自动安装所需的任何东西。嘿,谢谢你的帮助。问题是,我不知道如何使它更具体,因为这是我得到的唯一错误。我还没有找到一个可以解决我的问题的解决方案。很抱歉打扰大家,但我对编程还比较陌生。当你说在本地依赖它们时,你的确切意思是什么?我的意思是你应该创建一个小的虚拟阴谋集团项目(这可以通过
cabalinit
在一个新目录中创建,其中只有一个
.hs
文件)。然后,在
PROJECTNAME.cabal
文件中,在
build dependens
下列出您需要的包,您将能够导入
.hs
文件中的任何模块。然后可以使用
cabel repl
加载该文件,这与
ghci
类似,只是您需要的所有导入都已处理完毕。非常感谢!!!我一定会试试的。