Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to upgrade gtk2hsC2hs?

I am trying cabal install glib-0.12.3 under my Ubuntu 11.10 using cabal-install 0.10.2. However, it shows the following error messages:

setup: The program gtk2hsC2hs version >=0.13.5 is required but the version
found at /usr/bin/gtk2hsC2hs is version 0.13.4
cabal: Error: some packages failed to install:
glib-0.12.3 failed during the configure step. The exception was:
ExitFailure 1

After half an hour's search, I cannot find where this gtk2hsC2hs is. I dug into places like http://code.haskell.org/gtk2hs/tools/c2hs/, but could not seem to find the right version.

How could I upgrade my gtk2hsC2hs? Thanks!

like image 446
zw324 Avatar asked Apr 17 '12 19:04

zw324


1 Answers

It's part of the gtk2hs-buildtools package.

$ cabal install gtk2hs-buildtools

(maybe with the --global flag, depends on how you want to install packages in general) should provide you with the newest version that should be able to build the latest gtk2hs packages.

Since the old gtk2hsC2hs is in /usr/bin, make sure that the new one is either installed there (replacing the old) or in a directory appearing before /usr/bin in your $PATH. A default cabal install installs executables (on Linux) in $HOME/.cabal/bin, so it would be a good idea to have that the first directory in the $PATH.

like image 138
Daniel Fischer Avatar answered Nov 18 '22 09:11

Daniel Fischer