Next: , Previous: Requirements, Up: Installation Guide


2.2 Installing from source

The packages of YML and the libutil are provided as a compressed tarball. If you encounter any trouble while building YML, please contact me by mail at mailto:Olivier.Delannoy@gmail.com.

The first step is to extract the archives using

     $> tar xvzf libutil-0.1.3.tar.gz
     $> tar xvzf yml-1.0.4.tar.gz

This will create two folders named libutil-0.1.3 and yml-1.0.4. The first package to configure is libutil. In order to do so, go to the folder libutil-0.1.3, launch the configure script and start the build.

     $> cd libutil-0.1.3
     $> ./configure
     $> make
     $> make install
     $> cd ..

The last command install the file in the system. This might requires root permission on your system. If you want to know the full list of option available with the libutil package you can use

     $> configure --help

The most important option to me is named --prefix. This option allow you to fix the root of the installation folder for the library. It's really useful to install the software on a personal directory using configure the following:

     $> cd libutil-0.1.3
     $> configure --prefix=$HOME/yml_build
     $> make
     $> make install

Once you installed the libutil package you have to install the yml package itself. The operation are really similar to the libutil ones.

     $> cd yml-1.0.4
     $> ./configure
     $> make
     $> make install

If the configuration step failed on the detection of the utility library, you might need to execute the following command before executing configure.

     export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH

At this point you should be able to start using YML. If you need to more control on the installation or you want to check the various option available you can use:

     ./configure --help

It's also possible to install the yml package to not standard location using the –prefix option. If you also install the libutil in a not standard path, you might need to edit your environment to tune pkg-config. This software is used to detect the availability of the libutil. In order to detect library it search for .pc files in standard location such as /usr/lib/pkgconfig, /usr/local/lib/pkgconfig. You can help the pkg-config program to find out your installation of the libutil by defining the PKG_CONFIG_PATH environment variable. This is done using the following command:

     $> export PKG_CONFIG_PATH=$HOME/yml_build/lib/pkgconfig:$PKG_CONFIG_PATH

This command is specific to the bash shell you can do the same using setenv in shell not supporting export. The suite of command to apply to YML in order to install YML in your home directory is :

     $> export PKG_CONFIG_PATH=$HOME/yml_build/lib/pkgconfig:$PKG_CONFIG_PATH
     $> ./configure --prefix=$HOME/yml_build
     $> make
     $> make install

You can know use yml but you need to configure it firstly. The next section list the configuration files used and present the format. The content of the configuration file is not describe in the installation guide but the files list all existing options and can be used as a reference.

Finally, If you want to remove the yml package and the libutil package you can use the following command at the root of each source package :

     $> make uninstall