2

I am trying to install KeePassX. I downloaded the source from their website but whenever I try the following

sudo cmake -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_BUILD_TYPE=<build> -DWITH_GUI_TESTS=ON

I get the following error

CMake Error at /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
  Could NOT find Gcrypt (missing: GCRYPT_LIBRARIES GCRYPT_INCLUDE_DIR)
Call Stack (most recent call first):
  /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
  cmake/FindGcrypt.cmake:31 (find_package_handle_standard_args)
  CMakeLists.txt:157 (find_package)

tried googling the error but nothing useful came up.

2 Answers2

5

It seems you are missing some libraries for compiling. Before running cmake you can try installing libgcrypt20-dev or libgcrypt11-dev.

sudo apt-get install libgcrypt20-dev

Then run cmake again.

By the way, what's wrong with installing it from the official ubuntu repository?

sudo apt-get install keepassx
Anwar
  • 77,855
1mi
  • 419
0

Why can't you not simply follow the instructions? Why do you have to come up with something discouraged like sudo cmake?

From Source

Build Dependencies

The following tools must exist within your PATH:

make
cmake (>= 2.8.12)
g++ (>= 4.7) or clang++ (>= 3.0)

The following libraries are required:

Qt 5 (>= 5.2): qtbase and qttools5
libgcrypt (>= 1.6)
zlib
libxi, libxtst, qtx11extras (optional for auto-type on X11)

On Debian you can install them with:

sudo apt-get install build-essential cmake qtbase5-dev libqt5x11extras5-dev qttools5-dev qttools5-dev-tools libgcrypt20-dev zlib1g-dev libxi-dev libxtst-dev

Build Steps

To compile from source:

mkdir build
cd build
cmake ..
make [-jX]

You will have the compiled KeePassX binary inside the ./build/src/ directory.

To install this binary execute the following:

sudo make install

More detailed instructions available in the INSTALL file.

LiveWireBT
  • 29,597