Cabal无法在Linux上安装network

编程入门 行业动态 更新时间:2024-10-23 20:21:17
Cabal无法在Linux上安装network-2.6.3.1(Cabal failing to install network-2.6.3.1 on Linux)

简而言之,我对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.

更新

> 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

In short I am fairly new to the Haskell world and am having an issue installing a package with a dependency on 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.

Update

> 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

最满意答案

我建议使用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不支持沙箱。

I would recommend using stack it is fairly simply to install, also I would recommend using a newer version of GHC - this hvr-ppa can help you (GHC 7.10.2 or 8.0.1 are recommended!)

Remove your old ./ghc directory and reinstall your old tooling with stack

stack install ghcid stack install ghc-mod stack install happstack-server

Note: Do not forget to add ~/.local/bin to your $PATH otherwise ghc-mod etc. will not be found.

If you do not want to use stack - you need to find the cabal-package that installed the network package in it's old version - install that one in a sandbox and then install happstack-server in another sandbox.

If I recall correctly - Cabal 1.16 does not support sandboxes.

更多推荐

本文发布于:2023-08-05 09:07:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1431213.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Cabal   Linux   network

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!