Download source code: https://www.keepassx.org/downloads, choose “the Source code tarball”.
Prerequisites:
# apt-get install build-essential cmake qt4-qmake libqt4-dev libgcrypt-dev zlib1g-dev
Go in the folder where you downloaded the source code and type following commands:
$ tar -zxvf keepassx-2.0.tar.gz $ cd keepassx-2.0 $ mkdir build $ cd build $ cmake ../ $ make -j 4 $ sudo make install