1. What is a library? It's a piece or pieces of code, that doesn't do anything in its own right - by that I mean it's not an application you can run. The purpose of a library is to provide useful functions that other programmers can use without having to write the code themselves.
A good example is the one you're having trouble with, GTK. GTK is a GUI toolkit library. It contains routines to draw and manage "widgets" for you. A widget is something you see in a GUI - a window, a button, a poplist, a check box. All these things are widgets. If you're writing a GUI application to run on Linux, instead of figuring out how to implement all of these things yourself - lot of hassle - you can simply use this GTK library to do that for you. In the meantime you can concentrate on the important parts of your application: the specific things it must do that people probably won't have written libraries for.
A package is when an application has been wrapped up for easy delivery and installation. The application may consist of many files, which must be installed in specific locations, but the package comprises all of these files wrapped up into one single file plus the information the package manager needs to be able to install them all in the correct places. Example package managers are the Red Hat rpm system and the Debian apt-get system. Since you use Red Hat, you will be concerned with RPMs (Red hat Package Manager). It's dead easy: if you have a package (a .rpm file) you install it like this:
rpm -iv whatever_the_rpm_file_is_called.rpm
What is a module? The word "module" is a bit general, referring to a part of any system that is modular as opposed to a system that is centralised, but I expect you've probably seen it in relation to kernel modules. The kernel is the core of the operating system. Early in the development of Linux, Linus was criticised for having built a "monolithic" kernel; that is, it performed all of its functions in one big piece of code. Since then, it has been made possible to separate out functions of the kernel into "modules". These modules can be inserted into and out of the kernel at will. At your stage you probably don't need to worry about this yet.
2. If I were you, I'd go to www.gtk.org,
and download and install from scratch Glib, Pango, ATK and GTK, following the instructions given. I had trouble with GTK too; it was supposed to be installed from my Mandrake install discs, but I could not compile anything that used it. In the end I got the sources from gtk.org and installed them by hand and now everything is cool. Just ignore whatever Red Hat have installed on to your system.
3. When you install a program yourself, it probably goes either in /usr/bin or /usr/local/bin. If you installed it from a Red Hat rpm it probably went in /usr/bin, if you install something from source it will most likely go in /usr/local/bin.
But you don't really need to worry about this. You see, your system has an environment variable called the path
. You can see what it is set to by typing
at your console prompt. Whenever you enter a command at the prompt, your shell looks in every directory specified in your path for a file matching the command you entered. When it finds a match, it runs the file. If it finds no match, it says so.
So, if you installed Mozilla from an rpm, say, all you have to do is type mozilla at the console prompt, and it will start up for you. You can set up a desktop icon for it if you like, and how to do that depends on the desktop manager you're using but in most cases it's pretty straightforward.
4. No idea.
5. You don't have to understand. If you're installing an rpm, the rpm manager will complain to you if you are missing some dependency you need. If you're installing from source then you will probably have to run a configure script first; this script will inform you if you are missing a required dependency.