Re: [Haskell-beginners] Just started working with Haskell. Need some help

Hello again.
Thank you all for your very helpful replies (below)
Here is the error I got when I tried to run my script :
Could not find module `Graphics.GD'
Locations searched:
Graphics/GD.hs
Graphics/GD.lhs
As with the previous errors, I went on Google, to find out which module and/or package I needed to install.
Apparently, I need something called "GD"
When I tried : cabal install gd
I got the following :
Resolving dependencies...
Configuring gd-3000.7.3...
cabal-1.16.0.2: Missing dependencies on foreign libraries:
* Missing (or bad) header file: gd.h
* Missing C libraries: gd, expat
Failed to install gd-3000.7.3
cabal-1.16.0.2: Error: some packages failed to install:
gd-3000.7.3 failed during the configure step. The exception was: ExitFailure 1
Upon further inquiries via google, I found somewhere the following :
This problem can usually be solved by installing the system packages that
provide these libraries (you may need the "-dev" versions). If the libraries
are already installed but in a non-standard location then you can use the
flags --extra-include-dirs= and --extra-lib-dirs= to specify where they are.
I thought I did this already.
But, apparently, I did something wrong??
-----Original Message-----
From: beginners-request

Hi, W dniu 20.01.2014 08:06, Pyro Crane pisze:
Hello again.
Thank you all for your very helpful replies (below)
Here is the error I got when I tried to run my script :
*Could not find module `Graphics.GD'* *Locations searched:* *Graphics/GD.hs* *Graphics/GD.lhs*
As with the previous errors, I went on Google, to find out which module and/or package I needed to install.
Apparently, I need something called "GD"
When I tried : *cabal install gd*
I got the following :
*Resolving dependencies...* *Configuring gd-3000.7.3...* *cabal-1.16.0.2: Missing dependencies on foreign libraries:* ** Missing (or bad) header file: gd.h* ** Missing C libraries: gd, expat*
*Failed to install gd-3000.7.3* *cabal-1.16.0.2: Error: some packages failed to install:* *gd-3000.7.3 failed during the configure step. The exception was: ExitFailure 1*
Upon further inquiries via google, I found somewhere the following :
*This problem can usually be solved by installing the system packages that* *provide these libraries (you may need the "-dev" versions). If the libraries* *are already installed but in a non-standard location then you can use the* *flags --extra-include-dirs= and --extra-lib-dirs= to specify where they are.*
I thought I did this already.
But, apparently, I did something wrong??
This haskell package provides only library bindings. You need to install original library using system package manager. Regards, Emanuel

If you are using a Debian based system you could try: sudo apt-get install libgd2-xpm-dev In general look at the package description: http://hackage.haskell.org/package/gd-3000.7.3/gd.cabal
Extra-libraries: gd, png, z, jpeg, m, fontconfig, freetype, expat These extra libraries are required by the package and have to be installed using the system package manager, as Emanuel pointed out.

Hi,
Thanks for the replies.
I was able to solve the problem
Simply by deleting everything completely...........and re-installing the ghc from scratch, along with all haskell packages
(This is what I did earlier; but apparently, I missed something)
Anyway, it's working fine now
-----Original Message-----
From: Pyro Crane
participants (3)
-
Emanuel Koczwara
-
Pyro Crane
-
Roel van Dijk