3

我正在尝试安装 ghc-mod。运行 MacOS Mojave 10.14.1。现在,运行时cabal install ghc-mod我得到:

clang: warning: argument unused during compilation: '- nopie' [-Wunused-command-line-argument]
Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] trying: ghc-mod-5.8.0.0 (user goal)
[__1] trying: syb-0.7 (dependency of ghc-mod)
[__2] next goal: base (dependency of ghc-mod)
[__2] rejecting: base-4.11.1.0/installed-4.1... (conflict: ghc-mod =>
   base<4.10 && >=4.6.0.1)
[__2] rejecting: base-4.12.0.0, base-4.11.1.0, base-4.11.0.0, base-4.10.1.0,
base-4.10.0.0, base-4.9.1.0, base-4.9.0.0, base-4.8.2.0, base-4.8.1.0,
base-4.8.0.0, base-4.7.0.2, base-4.7.0.1, base-4.7.0.0, base-4.6.0.1,
base-4.6.0.0, base-4.5.1.0, base-4.5.0.0, base-4.4.1.0, base-4.4.0.0,
base-4.3.1.0, base-4.3.0.0, base-4.2.0.2, base-4.2.0.1, base-4.2.0.0,
base-4.1.0.0, base-4.0.0.0, base-3.0.3.2, base-3.0.3.1 (constraint from
non-upgradeable package requires installed instance)
[__2] fail (backjumping, conflict set: base, ghc-mod)
After searching the rest of the dependency tree exhaustively, these were the
goals I've had most trouble fulfilling: base, ghc-mod, syb

我没有发现任何关于这个特殊失败的信息。因此,我尝试根据此安装“可能需要安装”的快乐。

但是这样做我得到了以下警告:

Warning: could not create a symlink in /Users/myname/.cabal/bin for
happy because the file exists there already but is not managed by cabal. You
can create a symlink for this executable manually if you wish. The executable
file has been installed at /Users/myname/.cabal/bin/happy

我怎么能这样做?这甚至可以解决我之前的问题吗?

我也尝试过使用stack install ghc-mod,但我得到了Plan construction failed.

GHC、Cabal 和 Stack 都已更新。

4

0 回答 0