[Haskell-beginners] trying to install libraries for Haskell School of Expression
Sumit Sahrawat, Maths & Computing, IIT (BHU)
sumit.sahrawat.apm13 at iitbhu.ac.in
Sun Mar 1 05:52:38 UTC 2015
We have sandboxes now, which (I think) weren't there 2 yrs ago.
Try this:
$ mkdir hse # Directory for Haskell
school of expression
$ cd hse
$ cabal sandbox init # Create a new sandbox
$ cabal install gtk2hs-buildtools # Install
gtk2hs-buildtools inside sandbox
$ export PATH=".cabal-sandbox/bin:$PATH" # Add the binaries
installed in (current directory's) sandbox to $PATH
$ cabal install gtk # Install gtk (and
anything else you need)
The above works in my case. Also, if you have a lot of packages installed
in "~/.cabal", then I recommend that you remove them and install them in
sandboxes where they are actually required.
Manually, you'd do it as follows:
$ mv ~/.cabal/packages ~/temporary_package_storage # Long name to avoid
clash, save downloaded package sources
$ rm -rf ~/.ghc ~/.cabal # Remove all packages,
and ghc's knowledge of them
$ mkdir ~/.cabal # Make a new ~/.cabal
directory
$ mv ~/temporary_package_storage ~/.cabal/packages # Reinsert the saved
downloaded package sources
For more info, look here:
https://www.haskell.org/cabal/users-guide/installing-packages.html#developing-with-sandboxes
Also, after some time it becomes natural to deal with cabal.
For example, I have that export line in my .zshrc. Thus the sandbox
residing in current directory is always in my path.
Also, a shell function that you may want to use.
cabal-reset () {
if [[ ! -d ~/.cabal-packages ]] ; then # If backup does not
exist
mv ~/.cabal/packages ~/.cabal-packages # Make a backup
fi
rm -rf ~/.ghc ~/.cabal # Nuke everything
mkdir ~/.cabal # Create new ~/.cabal
ln -s ~/.cabal-packages ~/.cabal/packages # Symlink backup to
~/.cabal/packages
}
Hope this helps.
On 1 March 2015 at 10:10, DJ <jakep at arqux.com> wrote:
> Trying to install the package soegtk.
>
> I am running linux mint 17 with the latest (as of Feb. 28) haskell
> platform and cabal-install.
>
> I did install gtk2hs-buildtools and put the .cabal/bin in my path.
>
> Cannot install soegtk:
>
> Failed to install glib-0.12.5.4
> cabal: Error: some packages failed to install:
> cairo-0.12.5.3 failed during the configure step. The exception was:
> ExitFailure 1
> gio-0.12.5.3 depends on glib-0.12.5.4 which failed to install.
> glib-0.12.5.4 failed during the configure step. The exception was:
> ExitFailure 1
> gtk-0.12.5.7 depends on glib-0.12.5.4 which failed to install.
> pango-0.12.5.3 depends on glib-0.12.5.4 which failed to install.
> soegtk-0.12.1 depends on glib-0.12.5.4 which failed to install.
>
> Confession: I abandoned Haskell two years ago because of frustration with
> cabal and hackage. I decided to get back to the language today, and to
> start with Haskell School of Expression. I immediately run into the problem
> that the first thing I try to install with cabal does not work.
>
> Thanks for any help. Please tell me things are not just as bad now as they
> were when I left ;-)
>
> - DJP -
>
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
>
--
Regards
Sumit Sahrawat
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20150301/509b5896/attachment-0001.html>
More information about the Beginners
mailing list