cabal install zlib failing

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@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@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

Hi Haskellers,
I found that this works for me:
nix-shell -p zlib --run 'cabal install zlib'
Cheers,
-John
On Sun, 24 Apr 2016 at 23:55 John Ky
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@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@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
participants (1)
-
John Ky