The recommended way for end-user installations of Okular is using binary packages:
- For GNU/Linux and the BSDs use the package manager to find the Okular package (might be part of the broader kdegraphics package) and install it.
- For Windows have a look at the KDE on Windows Initiative webpage for information on how to install KDE on Windows.
- For Mac Os X have a look at the KDE on Mac OS X webpage for information on how to install KDE on Mac OS X.
Compiling Okular from source
If you want to compile Okular, you need to have an already set up compilation environment.
Distributions should provide development packages usable for compiling KDE applications.
In case you want to compile the development version of Okular, please refer to Build from source at KDE's Community Wiki.
If you are interested in stable tarballs of Okular visit the KDE Applications download folder and download the okular tarball.
There are some optional package you could install in order to have some more functionalities in Okular.
Some are already packaged for your distro, but other maybe not. So, if possible, use the packages your distro ships.
Poppler (PDF backend)
To compile the PDF backend, you need the Poppler library (http://poppler.freedesktop.org).
The minimum version required is:
- Okular 0.6: >= poppler 0.5.4
- Okular >= 0.7 >= poppler 0.6
- Okular >= 0.9 >= poppler 0.8
- Okular >= 0.15 >= poppler 0.12.1
- Okular >= 1.0 >= poppler 0.24
Remember to adjust the environment variables PKG_CONFIG_PATH and LD_LIBRARY_PATH to make poppler reachable:
export PKG_CONFIG_PATH=/where/install/poppler/lib/pkgconfig:$PKG_CONFIG_PATH export LD_LIBRARY_PATH=/where/install/poppler/lib:$LD_LIBRARY_PATH
Libspectre (PostScript backend for Okular >= 0.7)
In order to compile and use the PostScipt (PS) backend, you need libspectre >= 0.2.
If your distro does not package libspectre, or the packaged version is not enough, you can download it from http://libspectre.freedesktop.org.
DjVuLibre (DjVu backend)
To compile the DjVu backend, you need DjVuLibre >= 3.5.17.
If your distro does not package DjVuLibre, or the packaged version is not enough, you can download it from http://djvulibre.djvuzone.org.
libTIFF (TIFF/fax backend)
libTIFF is needed to compile the TIFF/fax backend. Currently there is no minimum required version, so any quite recent version of the library available from your distro should work. In case of troubles with that, do not hesitate to contact the Okular developers.
libCHM (CHM backend)
libCHM is needed to compile the CHM backend. Currently there is no minimum required version, so any quite recent version of the library available from your distro should work. In case of troubles with that, do not hesitate to contact the Okular developers.
Libepub (EPub backend for Okular >= 0.7)
In order to compile and use the EPub backend, you need the epub library.
If your distro does not package libepub, or the packaged version is not enough, you can download it from http://sourceforge.net/projects/ebook-tools.
You can download and compile Okular this way:
git clone git://anongit.kde.org/okular cd okular mkdir build cd build cmake -DCMAKE_INSTALL_PREFIX=/path/to/your/install/dir .. make make install
If you install Okular in a different path than your system install directory it is possible that you need to run
QT_PLUGIN_PATH=/path/to/your/install/dir/lib/x86_64-linux-gnu/plugins LD_LIBRARY_PATH=/path/to/your/install/dir/lib/x86_64-linux-gnu/ XDG_DATA_DIRS=/path/to/your/install/dir/share:$XDG_DATA_DIRS /path/to/your/install/dir/bin/okular
so that the correct Okular instance and libraries are picked up. Obviously you need to replace x86_64-linux-gnu with the correct name for your architecture.
[ Edit ]