Haskell, how to resolve the bondage error: Missing dependencies on foreign libraries?

When trying cabal install gd I found the following error:

 Configuring gd-3000.7.3... cabal: Missing dependencies on foreign libraries: * Missing (or bad) header file: gd.h * Missing C libraries: gd, png, jpeg This problem can usually be solved by installing the system packages that provide these libraries (you may need the "-dev" versions). ... 

It says Missing C libraries: gd, png, jpeg

I think I'm right when interpreted as: the missing libraries are some undefined versions : libgd , libpng , libjpeg and their -dev versions .

We see that here cabal did not report anything about the versions of these libraries, and therefore it is difficult to understand which version of foreign libraries it requires.

I read gd.cabal from hackage site

there is a line that says:

Extra-libraries: gd, png, z, jpeg, m, fontconfig, freetype, expat

But it also says nothing about versions of foreign libraries.

Is there any place where such information is available (but Kabbalah ignores it or I don’t know the correct switch)? Is there any switch I need to turn on? or is it the case when the bondage is in the power of the developer of this package, which may or may not include information about versions of foreign libraries?

I want to get a more general answer, not only related to this cabal install gd problem.

Sorry for a few questions, but I think they are related.

+7
haskell dependencies cabal
source share

No one has answered this question yet.

See similar questions:

3
Cabal cannot find foreign library when creating on NixOS

or similar:

670
How to tell Maven to use the latest version of the dependency?
52
How to reduce duplication in fields depending on the assembly of the .cabal file?
31
How to make cabal and nix work together
12
Haskell Cabal: how to ignore dependencies
4
Package Build Error in Hackage
3
How can I bind the Haskell dependency version to the Cabal base dependency version?
2
How to install dev branch in Cabal Sandbox
one
Kabbalah-dependent and transitive dependencies
0
There is no built-in library for building a Haskell package using Cabal, on Linux
0
Cabal cannot find foreign libraries

All Articles