Re: How to install GTK in linux



008/11/2 Ian Puleston <ian underpressuredivers com>:
> I downloaded the gtk 2.14 and glib 2.18 .tar.gz packages, unpacked them and
> ran configure, make and make install. But they install into /usr/local/lib
> and so the app still picks up the older versions from /usr/lib. I tried
> "make install prefix=/usr" but that failed with an error.

I wouldn't install to /usr, that area is managed by fedora for you and
you are likely to break everything horribly if you start messing with
it.

The best way to do this, in my opinion, is to install the new gtk to
/usr/local/ and then to build and run your app against that. This way
you won't disturb your system or any of the other applications you
have installed.

You need to set PKG_CONFIG_PATH so that your new gtk appears before
the system one for apps you build. Put something like this in your
.bashrc:

export PKG_CONFIG_PATH=/usr/local/liib/pkgconfig

then at the command-line, try:

$ source ~/.bashrc
$ pkg-config gtk+-2.0 --cflags

and verify that its seeing the version in /usr/local

Other stuff to set:

- add /usr/local/bin to your path so that you pick up the new versions
of any gtk/glib utilities
- add /usr/local/lib to LD_LIBRARY_PATH so that your app picks up the
gtk/glib libraries at run time
- you can add /usr/local/share/man to MANPATH, though I can't remember
if gtk still makes man pages

John


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]