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 Software on Windows. The stable release is available on the Microsoft Store. There are experimental nightly builds as well. Please test and send patches.
- For macOS have a look at the KDE on macOS webpage for information on how to install KDE Software on macOS.
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 poppler 0.24
Libspectre (PostScript backend)
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)
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 https://invent.kde.org/graphics/okular.git 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
source build/prefix.sh; okular
so that the correct Okular instance and libraries are picked up.