Tuesday, 1 June 2010

Installing leksah, gtk, gtk2hs, and glade on Ubuntu 10.04 LTS -the Lucid Lynx

  1. sudo apt-get install cabal-install
  2. sudo apt-get install libghc6-zlib-dev
  3. cabal update
  4. sudo cabal install cabal-install --global
  5. sudo apt-get install libgtk2.0-dev
  6. sudo apt-get install libgtksourceview2.0-dev
  7. sudo cabal install alex --global
  8. sudo cabal install happy --global
  9. sudo cabal install gtk2hs-buildtools --global
  10. sudo apt-get install libglade2-dev
  11. sudo cabal install glade --global
  12. sudo cabal install leksah --global


  1. Thanks,
    I also needed:
    sudo apt-get install libglade2-0 libglade2-dev

  2. i had to install additionally only libglade2-dev (with sudo apt-get or in synaptic).
    happy and alex can be installed from synaptic as well.

    thank you for the instructions!

  3. Thanks for comments ... i have updated the entry

  4. Thanks. Also works problem free under x86_64

  5. i get:

    Setting up ghc6 (6.12.1-12) ...
    ghc-pkg: /home/myuser/.ghc/x86_64-linux-6.12.1/package.conf.d/binary-shared-0.8-00180db675f2ea73ce16a4820071cd80.conf: hGetContents: invalid argument (invalid UTF-8 byte sequence)
    dpkg: error processing ghc6 (--configure):
    subprocess installed post-installation script returned error exit status 1
    Errors were encountered while processing:
    E: Sub-process /usr/bin/dpkg returned an error code (1)

    see also: http://code.google.com/p/leksah/issues/detail?id=183
    and: http://hackage.haskell.org/trac/ghc/ticket/4158

  6. Installing in a VirtualBox VM, I had to run this in a command line session (e.g. not running Gnome/KDE) - otherwise it froze.

  7. At the 4th step I get the following error:

    $ sudo cabal install cabal-install --global
    Warning: The package list for 'hackage.haskell.org' does not exist. Run 'cabal
    update' to download it.
    cabal: There is no package named cabal-install. Perhaps you need to run 'cabal
    update' first?

    Does step 3 need to be run as sudo as well? If I do that then step 4 succeeds.

  8. Hi Riz -
    When executing #4, I get:

    Warning: The package list for 'hackage.haskell.org' does not exist. Run 'cabal
    update' to download it.
    cabal: There is no package named cabal-install. Perhaps you need to run 'cabal
    update' first?

    So I repeat #3, "cabal update" and I get:

    Downloading the latest package list from hackage.haskell.org
    cabal: Codec.Compression.Zlib: premature end of compressed stream

    So I cannot get past #4. Any suggestions?
    Thanks! Larry ThomasLStanley@gmail.com

  9. Hi, I have a problem when try install, I get this message:

    Preprocessing library gtksourceview2-0.11.0...
    gtk2hsC2hs: Errors during expansion of binding hooks:

    ./Graphics/UI/Gtk/SourceView/SourceBuffer.chs:222: (column 10) [ERROR]
    >>> Unknown identifier!
    Cannot find a definition for `source_buffer_create_source_mark' in the header file.

    cabal: Error: some packages failed to install:
    gtksourceview2-0.11.0 failed during the building phase. The exception was:
    ExitFailure 1
    leksah- depends on gtksourceview2-0.11.0 which failed to install.

    I try a lot of posibilites
    * repeat all using --reinstall for each step.
    * install other version of gtksourceview2
    * use tarballs (this isn't the better choise)

    Anyway, I surrender.
    I'm open to suggestions.
    From already thank you very much.

    PD: My english is very bad, my apologies for this.

  10. Thanks -- useful instructions!

  11. Thanks a lot for the post! Four hours before I met it was terrible.

  12. Hi,

    at the 2nd step I get a dependency error. I get the message that the ghc6 package is not configured and because of that libghc6-base-dev- and libghc6-bytestring-dev- could also not be installed.

    what should i do now and how should i do it (with which commands?)?


  13. I'm on Ubuntu 10.10. I installed for my user only (home directory) but I needed to install gtk2hs-buildtools in the system.

    sudo aptitude install gtk2hs-buildtools

  14. I failed to install in my Ubuntu 10.10. This 'sudo aptitude install gtk2hs-buildtools' where should I put it within the above 12 steps? Having said that installing ghc is successful and I can do interactive in the Terminal. I just have problem installing this IDE. I wish to use this IDE because I don't want to venture into VI or EMAC. I would hope that some guru can put the whole thing into a .DEB package which I can download and run.

  15. I had the same thing as SSX.
    "apt-get install gtk2hs-buildtools" helps =)

  16. With the new Version of leksah (0.10), out since yesterday, this will not work anymore. While resolving the dependencys he will exclude the installed Versions, claining to need the older Versions. I don't quite know how to fix this, but it might just be best to wait for some time now. It appears to be their fault, since I got it to work an a similar system once already before the update.

  17. hello, having difficulty installing the latest on a late model toshiba sattelite (assume amd). was hoping you had some ideas as how to remedy the following.

    after the last above:

    sudo cabal install leksah --global

    get the following:

    configure: creating ./config.status
    config.status: creating network.buildinfo
    config.status: creating include/HsNetworkConfig.h
    Preprocessing library network-
    Building network-
    [ 1 of 10] Compiling Network.URI ( Network/URI.hs, dist/build/Network/URI.o )
    [ 2 of 10] Compiling Network.Socket.ByteString.IOVec ( dist/build/Network/Socket/ByteString/IOVec.hs, dist/build/Network/Socket/ByteString/IOVec.o )
    [ 3 of 10] Compiling Network.Socket.Internal ( dist/build/Network/Socket/Internal.hs, dist/build/Network/Socket/Internal.o )
    [ 4 of 10] Compiling Network.Socket ( dist/build/Network/Socket.hs, dist/build/Network/Socket.o )

    Ambiguous occurrence `closeFdWith'
    It could refer to either `Network.Socket.closeFdWith',
    defined at Network/Socket.hsc:1046:1
    or `GHC.Conc.closeFdWith',
    imported from GHC.Conc at Network/Socket.hsc:204:26-36
    cabal: Error: some packages failed to install:
    hslogger-1.1.4 depends on network- which failed to install.
    leksah- depends on network- which failed to install.
    leksah-server- depends on network- which failed to install.
    network- failed during the building phase. The exception was:
    ExitFailure 1