How to upgrade gtk2hsC2hs?
Asked Answered
L

1

16

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!

Lechner answered 17/4, 2012 at 19:20 Comment(0)
D
20

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.

Devilish answered 17/4, 2012 at 19:39 Comment(4)
I tried cabal install gtk2hs-buildtools first then cabal install glib-0.12.3, but the same error shows up again. Is there any other reasons for this error to show? Thanks! EDIT: Also tried cabal install glib-0.12.3, but it shows Versions installed : [ unknown ].Lechner
That probably means the old gtk2hsC2hs is before the new one in the $PATH. Have you $HOME/.cabal/bin in your path?Devilish
--global seals the deal for me. Thanks! Maybe next time I should just try to @ you when asking since you answered quite a few of my questions:) Thanks!Lechner
Heh :) But @ only works for people already involved in the post, so it wouldn't work :(Devilish

© 2022 - 2024 — McMap. All rights reserved.