1

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

当我做 cabal 安装光泽时,它说:

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 install -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 ´´´import ...´´´ 上执行时,它说:找不到模块。

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

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

4

0 回答 0