Installing KeePassX 2.x in Linux Mint

It’s been a little while since I’ve started playing around with Linux Mint on my laptop. It took me very little time to install few major applications and all seemed good. Then I run into a situation which prompted me to convert my desktop to Linux. And this is where things started to get rough(er).

I decided that I want to install KeePassX 2.0.2 as a password manager onto my desktop. I’ve briefly tried to use KeePass2 which is available through the package manager, but quickly realized that it’s an older version and that getting a newer version requires me to trust someone out there who provides a binary. Well, not so keen on trusting unknown entities with a security piece of software. This is when I started looking at KeePassX, for which, unfortunately, the authors provide only sources and not the binaries that can be installed – that means you as an end user have to build it all yourself. It’s not a problem for anyone who’s been using Linux for a while, but a pain in the rear for a newcomer (even though I’ve been doing software for about 2 decades, haha).

Here I will provide you with instructions on how to get this all done. Hopefully it’ll be useful to someone out there.

  1. Install dependencies:
    sudo apt-get install build-essential cmake qtbase5-dev libqt5x11extras5-dev qttools5-dev qttools5-dev-tools libgcrypt20-dev zlib1g-dev qt-sdk libxtst-dev libxi-dev checkinstall
  2. Figure out where you want to build the application (I used ~/Downloads folder)
    cd ~/Downloads
  3. Download the source
  4. Unpack the archive
    tar -xvf keepassx-2.0.2.tar.gz
  5. cd keepassx-2.0.2
  6. Create a directory in which the build files will be created
    mkdir build
  7. Switch into the build directory
    cd build
  8. Prepare to build the application. Make sure to have double dots at the end of the command!
    cmake ..
  9. Build the application
  10. Use checkinstall tool to build .deb package and install it into the system
    sudo checkinstall
  11. The tool will ask you to set few options. Make sure to set the following values:
    • Maintainer: set this to your name/email
    • Summary: define brief package summary
    • Name: set the name of the application (this will be the name of the package in the end)
    • Version: set application version
    • Group: set to the group to which this application belongs to
    • Alternate source location: set this to the URL from which the source was downloaded
  12. Follow few next prompts. In the end the tool will create the .deb package and install the executable into /usr/local/bin and a .desktop file into /usr/local/share/applications.
    • You can use the .deb file that was created to install the application on any other machine if you’d like
  13. If you ever want to remove the package, use the following (keepassx is the Name value from #11 above):
    dpkg -r keepassx

Well, this should be it. Hopefully this is helpful.


  • Nicolas

    Hello, its Really a great guide Thanks a lot. I only would like to know if after the installation the keepassx-2.0.2 directory created in Downloads can be erase? …Thanks a lot.

    August 13, 2016
    • Alexander

      Hi Nicolas. Sorry, I didn’t see your comment. Yes, you can safely delete the sources for the software – you don’t need them once you’ve got your own .deb file.

      August 25, 2016

Leave a comment


Email(will not be published)*


Your comment*

Submit Comment

© Copyright Alexander Yermakov. My life. - Designed by Pexeto