Compiling and Installing

Compiling Krusader. What now?

Check the environment variables KDEDIR - QTDIR.

To compile and install Krusader on your system, type the following in the base directory of the Krusader package:

      $ ./configure
      $ make
      $ su -c 'make install'

If you install a CVS or beta version and if Krusader was previously installed on your computer, then you should delete the krusaderui.rc file in your home directory to activate the new menu entries $ rm ~/.kde/share/apps/krusader/krusaderui.rc , click here for more info.

Since Krusader uses autoconf and automake you should have no trouble compiling it. If you run into problems, read the detailed installation instructions below.

Quickstart Installation Tutorial

Debian

These instructions should work as well on Debian® based distributions like: Ubuntu®, Kubuntu®, Linspire®, Kanotix®, ...

Add the next lines in the ~/.bashrc configuration file

export QTDIR=/usr
export KDEDIR=/usr
export export KDEDIRS=/opt/krusader:/usr

Install the build dependencies for Krusader

# apt-get build-dep krusader

Download the Krusader sourcecode, unpack and enter the krusader_kde3 directory.

The next command will create ./configure

$ make -f Makefile.cvs
NOTE: you might need to upgrade automake and/or autoconf, if an error message appears.

Install Krusader in the /opt directory to not overwrite the official Debian® binary /usr/bin/krusader, so that krusader will run the official Debian® package and /opt/bin/krusader runs the compiled version. It's recommended to use enable the full debug, so that you can possible problems at us. Run configure.

$ ./configure --prefix=/opt/krusader --enable-debug=full

Compile Krusader

$ make

Install Krusader

$ su -c "make install"

/opt/bin/krusader runs the compiled Krusader version.

SuSE

Install the build dependencies for Krusader

Download the Krusader sourcecode, unpack and enter the krusader_kde3 directory. Now you can compile and install Krusader

$ make -f Makefile.cvs
$ ./configure --prefix=/opt/krusader --enable-debug=full
$ make
$ su -c "make install"

For other Linuxes

Ofcource it's impossible to cover all Linuxes, but here are the general installation instructions.

Usually ./configure --prefix=/usr should be used, though options like /opt/krusader are usually better so that you don't overwrite files that are installed by your package managment system. Please don't use the /usr/local directory as it simply won't work.

Install the build dependencies for Krusader

Download the Krusader sourcecode, unpack and enter the krusader_kde3 directory. Now you can compile and install Krusader

$ make -f Makefile.cvs
$ ./configure --prefix=/usr
$ make
$ su -c "make install"

Detailed Installation Tutorial

The next section will explain how to install Krusader step by step. Questions about the installation process have been asked many times and especially users new to Linux® often have problems compiling software from source. Therefore, we are trying to keep the explanations as detailed as possible even if they are mostly not Krusader specific. Experienced users may easily skip most of the steps.

Unfortunately, because not all Linux® distributions follow the Filesystem Hierarchy Standard (FHS) it is impossible to write a tutorial that would cover all circumstances. However, these guidelines will help you in the right direction.

Note

If you encountered problems, please read first this installation procedure and the FAQ. If the problem persists, use the help request to ask for help.

  1. Install all packages and libraries that are needed for the compilation, please read the FAQ.

    Tip

    If you install Kdevelop, (almost) everything that you need to compile Krusader will be installed on your computer. However, if you are not a developer, please follow the instructions and do not use Kdevelop to compile Krusader.

  2. Open your favourite terminal emulator (e.g. Konsole).

  3. We recommend you create a separate directory to keep all the sources you compile in. This way you will have a better overview of the installed programs and it will be easier to uninstall them later.

    $ mkdir ~/source
    The chosen directory is just an example, any other will work.

  4. Copy the sources to the ~/source directory and unpack them.

    $ cp /"your_dir" /krusader-x.xx.tar.gz ~/source
    $ cd ~/source
    $ tar -xzvf krusader-x.xx.tar.gz

  5. Optional step: if you wish you can delete the tarball at this point as it is no longer needed.

    $ rm krusader-x.xx.tar.gz

  6. Change to the directory containing the sources.

    $ cd krusader-x.xx

  7. Check the environment variables QTDIRand KDEDIR. Krusader's ./configure script needs to know where the Qt™ and KDE directories are.

    QTDIR: <path to your Qt installation> e.g. /usr/lib/qt3 or /usr/qt3

    KDEDIR: <path to your KDE installation> e.g. /usr or /opt/kde3

    Normally your distribution will set them for you, but experience has shown that some do not. You can easily check the values with the echo command.

    $ echo $QTDIR/usr/lib/qt3
                      $ echo $KDEDIR/usr
    If both commands give an output, the enviroment variables are set (the above example are the settings of Mandriva®-Linux®). In case you receive empty lines, the variables are not set and you have to set them manually. If you do not know what to set the variables to, or if you want to check if the variables are correctly set, ask your distributor or use the find command.
    $ find /usr /opt -name qtconfig -type f 2>/dev/null
    /usr/lib/qt3/bin/qtconfig
    $ find /usr /opt -name kdeinit -type f 2>/dev/null
    /usr/bin/kdeinit
    In this case /usr/lib/qt3 is your QTDIR and /usr is your KDEDIR. The installed binaries will go to /usr/bin. Now we will set the enviroment variables with the export command.
    $ export QTDIR=<replace with your QTDIR>
    $ export KDEDIR=<replace with your KDEDIR>

    Note

    These enviroment variables are only set for the lifetime of your current shell. When you close your terminal and open a new one they will be gone. Assuming Krusader is not the only Qt™/KDE program you want to compile, we recommend to make these settings permanent (e.g. append both export commands to your /etc/profile) file.

    If you can notdetermine your KDEDIR, kde-config --prefix might help you.

  8. If you have downloaded a stable version "krusader-x.xx.tar.gz" or a beta version "krusader-x.xx-betax.tar.gz", you can skip this step. In this case the ./configure script is provided.

    If you have downloaded a CVS build or nightly tarball "krusader-cvs-yyyy-mm-dd.tar.gz"", you will have to run the following command to create the ./configure script:

    $ make -fMakefile.cvs

    If everything is OK you will see the following output on your screen:

    $ make -f Makefile.cvs
    This Makefile is only for the CVS repository
    This will be deleted before making the distribution
    *** Creating acinclude.m4
    *** Creating list of subdirectories
    *** Creating configure.in
    *** Creating aclocal.m4
    *** Creating configure
    *** Creating config.h template
    *** Creating Makefile templates
    *** Postprocessing Makefile templates
    *** Creating date/time stamp
    *** Finished
    Don't forget to run ./configure
    If you haven't done so in a while, run ./configure --help
    $

    Note

    You will need to have autoconf 2.52, 2.53 or 2.54 and automake 1.6 (or higher) to run the make -f Makefile.cvs command

    Tip

    If you encounter problems with this command click here. Krusader provides two nightly builds (snapshots) one with a ./configure script and one without.

  9. Your Linux® distro Krusader RPM or DEB package will normally install Krusader in the KDEDIR/bin directory. According to the Filesystem Hierarchy Standard (FHS), any user installed files go to the /usr/local directory. If you wish Krusader to be installed in another directory, it can be determed with the prefix option. If you do not have root access, /home/YOUR_USERNAME/.kde is probably a good choice.

    foo
    
    Krusader Project:
    -----------------
    Source code location: .
    C Compiler:           gcc
    C Compiler flags:     -ansi -W -Wall -pedantic -Wchar-subscripts -Wshadow -Wpointer-arith
    -Wmissing-prototypes -Wwrite-strings -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -O2
    -Wformat-security -Wmissing-format-attribute
    C++ Compiler:         g++
    prefix:               /usr/local
    kde_libraries:        /usr/include
    kde_includes:         /usr/lib
    kde_locale:           /usr/share/locale
    qt_libraries:         /usr/lib/qt3/lib
    qt_includes:          /usr/lib/qt3/include
    KDEDIR:               /usr
    QTDIR:                /usr/lib/qt3
    Install path:         /usr/local/bin
    krusader version:     1.80.0
    krusader binary:      /usr/local/bin/krusader     (after 'make install')
    Thank you for using Krusader
    
    Good - your configure finished. Start make now
    bash$
    

    This is the output for Mandrake™-Linux® 10, other distributions may give a different output.

    Tip

    At the end of the ./configure script you will find a summary of the most important settings, e.g. where the Krusader binary will be installed (after the 'make install' command). This part will also display a warning if the environment variables KDEDIR - QTDIR are empty.

    Since Krusader-1.70.0 ./configure has two specific Krusader options:

    • ./configure --without-konqueror : build Krusader without support Konqueror's servicemenus, default=with. This means that Konqueror's right-click menu entries will not be available.

    • ./configure --without-javascript : build Krusader without JavaScript support, default=with. This means that the JavaScript console will not be available.

    • ./configure --without-acl : build Krusader without ACL support default=with. Sometimes this option is needed if you get a ACL compile error when running make.

    In the past the support was always compiled in when the headers where found, now you have the choice.

    Use ./configure --help to see more options or read the INSTALL file in the Krusader sources.

    If you used another --prefix= than $KDEDIR or /usr/local, it is recommended to do an extra check:

    $ kde-config --path exe
    /home/frank/.kde/bin/:/usr/bin/:/usr/local/bin/   
    $
    If the <prefix_dir/bin> directory is not shown, you need to use e.g. export KDEDIRS=/usr/local:/usr. To make these settings permanent you can e.g. append this export command to your /etc/profile file. After that you need to restart KDE.

    Note

    If ./configure fails, take a look at FAQ missing libs or headers.

  10. Start the compilation process with the make command.

    $ make
    This will take about 3 - 40 minutes depending on how fast your computer runs. If everything goes well, it will e.g. end with the following messages:
    foo
    make[2]: Leaving directory `/home/source/krusader_kde3/tar'
    make[2]: Entering directory `/home/source/krusader_kde3'
    make[2]: Leaving directory `/home/source/krusader_kde3'
    make[1]: Leaving directory `/home/source/krusader_kde3'
    bash$
    

    If ./configure was successful and make failed for some reason, continue to read this page. If you can not find a solution to your problem, feel free to post a help request at our Krusader Forum.

  11. If everything is correct, you can now install Krusader.

    $ su -c 'make install'
    You will be asked to enter your root password.

  12. If you install a CVS or beta version and if Krusader was previously installed on your computer, then you should delete the krusaderui.rc file in your home directory to activate the new menu entries $ rm ~/.kde/share/apps/krusader/krusaderui.rc , click here for more info.

  13. Now you can start Krusader.

  14. Optional step: Cleaning up to save disk space. Note: All compiled files created with the makecommand will be deleted.

    $ make clean

  15. If you ever want to uninstall Krusader, use

    $ su -c 'make uninstall'
    You will be asked to enter your root password.

If you followed the installation procedure and still encountered problems installing Krusader, refer to FAQ. If the problem persists, use the help request to ask for help.