Cabal无法在Linux

时间:2016-09-04 11:32:47

标签: linux haskell ubuntu-14.04 cabal hackage

简而言之,我对Haskell世界相当新,并且在安装依赖于network-2.6.3.1的软件包时遇到问题。

cabal install happstack-server
Resolving dependencies...
Configuring network-2.6.3.1...
Failed to install network-2.6.3.1
cabal: Error: some packages failed to install:
happstack-server-7.4.6.2 depends on network-2.6.3.1 which failed to install.
hslogger-1.2.10 depends on network-2.6.3.1 which failed to install.
network-2.6.3.1 failed during the configure step. The exception was:
ExitFailure 127
sendfile-0.7.9 depends on network-2.6.3.1 which failed to install.

自行安装网络会产生类似的结果。错误安装是否有任何常见的嫌疑或推荐步骤?我已经成功安装了其他软件包,ghcid,ghc-mod等。

更新

> ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.6.3
> cabal --version
cabal-install version 1.16.0.2 using version 1.16.0 of the Cabal library"
> ghc-pkg list 
/var/lib/ghc/package.conf.d
   Cabal-1.16.0
   GLURaw-1.3.0.0
   GLUT-2.4.0.0
   HTTP-4000.2.8
   HUnit-1.2.5.2
   MonadCatchIO-mtl-0.3.0.5
   OpenGL-2.8.0.0
   OpenGLRaw-1.3.0.0
   QuickCheck-2.6
   array-0.4.0.1
   async-2.0.1.4
   attoparsec-0.10.4.0
   base-4.6.0.1
   bin-package-db-0.0.0.0
   binary-0.5.1.1
   bytestring-0.10.0.2
   case-insensitive-1.1.0.2
   cgi-3001.1.8.3
   containers-0.5.0.0
   deepseq-1.3.0.1
   directory-1.2.0.1
   extensible-exceptions-0.1.1.4
   fgl-5.4.2.4
   filepath-1.3.0.1
   ghc-7.6.3
   ghc-prim-0.3.0.0
   hashable-1.2.1.0
   haskell-src-1.0.1.5
   haskell2010-1.1.1.0
   haskell98-2.0.0.2
   hoopl-3.9.0.0
   hpc-0.6.0.0
   html-1.0.1.2
   integer-gmp-0.5.0.0
   mtl-2.1.2
   network-2.4.1.2
   old-locale-1.0.0.5
   old-time-1.1.0.1
   parallel-3.2.0.3
   parsec-3.1.3
   pretty-1.1.1.0
   primitive-0.5.0.1
   process-1.1.0.2
   random-1.0.1.1
   regex-base-0.93.2
   regex-compat-0.95.1
   regex-posix-0.95.2
   rts-1.0
   split-0.2.2
   stm-2.4.2
   syb-0.4.0
   template-haskell-2.8.0.0
   text-0.11.3.1
   time-1.4.0.1
   transformers-0.3.0.0
   unix-2.6.0.1
   unordered-containers-0.2.3.0
   vector-0.10.0.1
   xhtml-3000.2.1
   zlib-0.5.4.1
/home/myHome/.ghc/x86_64-linux-7.6.3/package.conf.d
   base64-bytestring-1.0.0.1
   blaze-builder-0.4.0.2
   blaze-html-0.8.1.2
   blaze-markup-0.7.1.0
   bytestring-0.10.8.1
   bytestring-builder-0.10.8.1.0
   cereal-0.5.3.0
   exceptions-0.8.3
   fail-4.9.0.0
   monad-control-1.0.1.0
   mtl-2.2.1
   network-uri-2.6.1.0
   parsec-3.1.11
   system-filepath-0.4.13.4
   threads-0.5.1.4
   time-compat-0.1.0.3
   transformers-0.5.2.0
   transformers-base-0.4.4
   transformers-compat-0.5.1.4
   utf8-string-1.0.1.1

1 个答案:

答案 0 :(得分:1)

我建议使用stack安装相当简单,我也建议使用更新版本的GHC - 这hvr-ppa可以帮到你(建议使用GHC 7.10.2或8.0.1) !)

删除旧的./ghc目录并使用堆栈

重新安装旧工具
stack install ghcid
stack install ghc-mod
stack install happstack-server

注意:不要忘记将~/.local/bin添加到$PATH,否则ghc-mod等将无法找到。

如果您不想使用stack - 您需要在其中找到安装了网络软件包的cabal-package旧版本 - 在沙箱中安装该软件包然后安装happstack-server在另一个沙盒中。

如果我没记错的话--Cabal 1.16不支持沙箱。