# Installation

The following sections contain detailed instructions for obtaining, compiling, and installing &kst; along with any optional libraries or packages. If you use a package management system, you may use it to install &kst; instead.

## Obtaining &kst;

&kst; is part of the extragear/graphics module of &kde;. You can also download the latest version separately from the &kst; website.

The current version of &kst; is also available via SVN. It can be downloaded anonymously with the following command:

    svn co svn://anonsvn.kde.org/home/kde/trunk/extragear/graphics

You can also browse the &kst; source code using the KDE WebSVN repository at http://websvn.kde.org/trunk/extragear/graphics/kst/.

More information about accessing KDE SVN repositories can be found at http://developer.kde.org/documentation/tutorials/subversion/.

## Installing &kst; from Source

The following sections detail how to compile and install &kst; from source code.

### Requirements

&kst; v1.4.0 requires the &kde; 3.4 libraries and &Qt; 3.3. Almost all major &Linux; distributions have packages for &kde; and &Qt;. Since &Qt; is a dependency of &kde;, having the required version of &kde; should be sufficient. It is recommended that you refer to your particular distribution's documentation for &kde; library installation. Note that the entire &kde; desktop environment is not required—in most cases, look for packages called `kdebase-*` and `kdelibs-*`. Alternatively, more information is available on the &kde; website.

### Optional Libraries and Packages

The following libraries and packages are optional, but provide full plugin and data source functionality in &kst; if installed. Installation/Download instructions for the packages are given on the linked websites.

You may already have some or all of these libraries and packages installed, in which case there is no need to reinstall them. Also, check first to see if pre-compiled binaries for the libraries and packages exist in your distribution's package management system, as it may be easier to install these packages.

Library | Description
--- | ---
GSL | The &GNU; Scientific Library (GSL) provides a variety of mathematical operations for the built-in &kst; plugins. Having GSL installed enables a variety of plugins such as linear and non-linear fitting, correlation, and interpolation.
CFITSIO | CFITSIO provides support for reading and writing to the FITS (Flexible Image Transport System) data format. This is required by all of the datasources which use FITS (currently HEALPix, LFIIO, and WMAP)
CDF | The Common Data Format (CDF) library is required to read files with the CDF datasource
netCDF | The network Common Data Form (netCDF) library is required to read files with the netCDF datasource

### Compiling and Installing

Once all of the prerequisites have been met on your system you can compile and install &kst;. It is assumed that you have already downloaded the &kst; source package. If not, please see Obtaining &kst;.

The simplest way to install &kst; is:

    tar -zxvf kst-version.tar.gz
    cd kst-version
    ./configure --prefix=`kde-config --prefix`
    make
    make install

replacing version with the version of &kst; you have.

Note that `kde-config --prefix` is surrounded by backquotes. It is very important that the `kde-config` utility returns the correct path (most likely `/usr`), otherwise &kst; will not install properly. You can double-check by running it directly:

    kde-config --prefix

Ensure that a non-null path is displayed.

You can read through the messages displayed by the `configure` script—if it reports any missing libraries (such as GSL) that should not be missing, please go back and ensure that the libraries and header files have been correctly installed in the appropriate locations.