Useful thread and information about installing programs.
How to install from source
Basically this short how-to will explain how to install those tar.gz and .tgz type files. It will cover the basic
commands and steps to get you to install a program from source with no problems, or at least get you in the right
So we'll take an example download program, gaim for example since its popular and commonly asked on this site on
how to install from source.
After you download gaim which I believe the latest stable version is gaim-0.59.8.tar.gz, most of the time it will
download to your home directory by default unless you specify elsewhere.
The first thing we want to do is cd into the directory where we've downloaded it.
newly downloaded gaim-0.59.8.tar.gz. The next step/command involves the extraction of the files that are tarballed.
In this case this would create a directory named ~/gaim-0.59.8
At times you will also need to use the z flag if the file is compressed thru gzip, most of the time you will know
cause it will spit an error out saying that it is compressed, etc. To run this option you would use something like
or an existing directory you can run a command like this:
to install from source, some programs might differ as most will always be tarballed with a INSTALL, README or both files.
It is always a good idea to read these files to find specific instructions on how to install any particular program.
Follow these steps to install the program from a command or terminal after cd'ing into the directory you just
extracted the program to:
If you don't get any errors then you will want to go to the next step to make.
need access to particular parts of your system where a regular user has no rights to write to.
existing directory you were working from instead of placing you in root's home directory. The exit command will log you
out of being root.
Now its optional but to clean up any temp files that were created you can do this:
always resort to the man pages.
Hope this helps any newcomers to Linux as to any others that want to install from a tarball source file.
Contributed by mhearn
Compiling from source is something that will always work, given enough
time and patience. Things become a lot easier however when there is a
package available for your distro. Red Hat, SuSE and Mandrake all use
RPM packages, and it is vital that you only use RPMs designed for your
distro, and usually, for the exact version of your distro.
Other RPMs may work, but also they may not. RPMs are normally clearly
labelled as to which distro they are meant for in their file names
(unless they are specifically designed to install on any), for example:
RPMs meant for older versions of a distro can sometimes be installed on
newer ones, but rarely, if ever, the other way around. For instance, a
package meant for Mandrake 8.1 will probably install OK on 8.2, but a
package meant for Mandrake 9 will not run on 8.1.
To install an RPM, you must first download it and then, as root, run
Remember to use tab completion to save typing! :)
Sometimes RPM may refuse to install a package. Errors about missing or
failed dependencies mean you need to find, download and install those
packages first. But be careful! Not all packages can be installed from
the net. In particular:
* Failed dependencies that mention GLIBC are probably an indication that
you downloaded an RPM meant for another distro, or a newer version of
your own distro. If there is no RPM available, use the source tarball
(tar.gz file). You cannot upgrade glibc, but you'll find that using an
RPM built for your distro, or compiling from source, will magically fix
* There are some packages that you almost certainly have on your
distribution CDs, but might not be installed depending on what options
you chose when you first installed Linux itself. Examples of such
packages would be gcc, GTK, glib, Qt, anything related to KDE or GNOME
and so on. When you need to resolve a dependency (install a package the
one you want needs), check the CDs first to see if they are available on
there. For Redhat users, you can use the "Add/Remove Packages tool" and
have a hunt under the options. Mandrake users might want to try urpmi.
* A file ending in .src.rpm is a different thing entirely, you probably
want to avoid these for now.
* If two packages appear to depend on each other, this is called a
circular dependency and can be fixed by specifying them all on the same
command line to RPM, for instance:
is to use a program that will automatically download and install (or
upgrade) the software you ask for, as well as anything it needs. For
Redhat users, you want to get apt - Mandrake users already have such a
thing included, called urpmi.
To install apt, get the RPM from freshrpms.net
(http://apt.freshrpms.net/) and then run as root:
software you want from a list and the package, and any dependencies,
will be automatically installed. A word of caution - not all software is
available via apt, so you'll still need to know how to compile from
source, and install RPMs by hand.
Sometimes RPM might freeze. If you run rpm from the command line, and it
doesn't do anything for say 30 seconds, RPM probably broke. To fix it,
make sure nothing is running that might be using it (for instance, shut
down synaptic or the add/remove packages window) and run these commands
Installing software can be one of the most confusing and convoluted
aspects of using Linux, expect improvements to it in the next few years.
For now, just remember that if a program is being especially obstinate
about installing, rpmfind.net, freshrpms.net and the source tarballs are
- thanks mhearn
|All times are GMT -5. The time now is 04:48 PM.|