VeraCrypt
aboutsummaryrefslogtreecommitdiff
VeraCrypt - Free Open source disk encryption with strong security for the Paranoid
VeraCrypt

Documentation >> Technical Details >> Building VeraCrypt From Source >> Linux Build Guide

This guide describes how to set up a Linux System to build VeraCrypt from source and how to perform compilation.
The procedure for a Ubuntu 22.04 LTS system is described here as an example, the procedure for other Linux systems is analogous.


The following components are required for compiling VeraCrypt:
  1. GNU Make
  2. GNU C/C++ Compiler
  3. YASM 1.3.0
  4. pkg-config
  5. wxWidgets 3.x shared library and header files installed by the system or wxWidgets 3.x library source code
  6. FUSE library and header files
  7. PCSC-lite library and header files

Below are the procedure steps. Clicking on any of the link takes directly to the related step:

They can also be performed by running the below list of commands in a terminal or by copying them to a script:
sudo apt update
sudo apt install -y build-essential yasm pkg-config libwxgtk3.0-gtk3-dev
sudo apt install -y libfuse-dev git libpcsclite-dev
git clone https://github.com/veracrypt/VeraCrypt.git
cd ~/VeraCrypt/src
make

Installation of GNU Make

  1. Open a terminal
  2. Execute the following commands:
    sudo apt update
    sudo apt install build-essential

Installation of GNU C/C++ Compiler

If the build-essential were already installed in the step before, this step can be skipped.

  1. Open a terminal
  2. Execute the following commands:
    sudo apt update
    sudo apt install build-essential

Installation of YASM

  1. Open a terminal
  2. Execute the following commands:
    sudo apt update
    sudo apt install yasm

Installation of pkg-config

  1. Open a terminal
  2. Execute the following commands:
    sudo apt update
    sudo apt install pkg-config

Installation of wxWidgets 3.2

  1. Open a terminal
  2. Execute the following commands:
    sudo apt update
    sudo apt install libwxgtk3.0-gtk3-dev

Installation of libfuse

  1. Open a terminal
  2. Execute the following commands:
    sudo apt update
    sudo apt install libfuse-dev

Installation of libpcsclite

  1. Open a terminal
  2. Execute the following commands:
    sudo apt update
    sudo apt install libpcsclite-dev

Download VeraCrypt

  1. Open a terminal
  2. Execute the following commands:
    sudo apt update
    sudo apt install git
    git clone https://github.com/veracrypt/VeraCrypt.git

Compile VeraCrypt

Remarks:

  • By default, a universal executable supporting both graphical and text user interface (through the switch --text) is built.
    On Linux, a console-only executable, which requires no GUI library, can be built using the 'NOGUI' parameter.
    For that, you need to dowload wxWidgets sources, extract them to a location of your choice and then run the following commands:
    make NOGUI=1 WXSTATIC=1 WX_ROOT=/path/to/wxWidgetsSources wxbuild
    make NOGUI=1 WXSTATIC=1 WX_ROOT=/path/to/wxWidgetsSources
  • If you are not using the system wxWidgets library, you will have to download and use wxWidgets sources like the remark above but this time the following commands should be run to build GUI version of VeraCrypt (NOGUI is not specified):
    make WXSTATIC=1 WX_ROOT=/path/to/wxWidgetsSources wxbuild
    make WXSTATIC=1 WX_ROOT=/path/to/wxWidgetsSources
Steps:
  1. Open a terminal
  2. Execute the following commands:
    cd ~/VeraCrypt/src
    make
  3. If successful, the VeraCrypt executable should be located in the directory 'Main'.