r-bonallo r-bonallo - 3 months ago 19
Linux Question

Cabal failing to install network-2.6.3.1 on Linux

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.


Installing network on its own yields similar results. Are there any usual suspects or recommended steps for erroring installations? I have successfully installed other packages, ghcid, ghc-mod etc.

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

Answer

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.

Comments