[Haskell-beginners] cabal install zlib failing

John Ky newhoggy at gmail.com
Sun Apr 24 13:55:08 UTC 2016


Hello Haskellers,

Does anyone know what to do in this situation?

cabal install zlib
Resolving dependencies...
Notice: installing into a sandbox located at
/home/ubuntu/hw-files/.cabal-sandbox/7.10.3
Downloading zlib-0.6.1.1...
Configuring zlib-0.6.1.1...
Failed to install zlib-0.6.1.1
Build log ( /home/ubuntu/hw-files/.cabal-sandbox/7.10.3/logs/zlib-0.6.1.1.log ):
Configuring zlib-0.6.1.1...
setup-Simple-Cabal-1.22.5.0-x86_64-linux-ghc-7.10.3: Missing dependency on a
foreign library:
* Missing (or bad) header file: zlib.h
* Missing C library: z
This problem can usually be solved by installing the system package that
provides this library (you may need the "-dev" version). If the library is
already installed but in a non-standard location then you can use the flags
--extra-include-dirs= and --extra-lib-dirs= to specify where it is.
If the header file does exist, it may contain errors that are caught by the C
compiler at the preprocessing stage. In this case you can re-run configure
with the verbosity flag -v3 to see the error messages.
cabal: Error: some packages failed to install:
zlib-0.6.1.1 failed during the configure step. The exception was:
ExitFailure 1

This is what I have in my environment:

ubuntu at box1179:~/hw-files$ dpkg -l | grep zlib
ii  zlib1g
1:1.2.3.4.dfsg-3ubuntu4                             compression
library - runtime
ii  zlib1g:i386
1:1.2.3.4.dfsg-3ubuntu4                             compression
library - runtime
iU  zlib1g-dev
1:1.2.8.dfsg-1ubuntu1                               compression
library - development

And this:

ubuntu at box1179:~/hw-files$ nix-env -q
cabal-install-1.22.9.0
ghc-7.10.3
nix-1.11.2
zlib-1.2.8

Cheers,

-John
​
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20160424/8e22c73b/attachment.html>


More information about the Beginners mailing list