How to install VeraCrypt on Linux

VeraCrypt is the successor of the TrueCrypt program. It is designed to encrypt disks and provides very strong security. The program is completely free, the source code is open, the author of the program regularly releases updates that not only fix errors, but also bring new functions and improvements.

Installing VeraCrypt on Linux

VeraCrypt is absent in the standard repositories of some popular Linux distributions. Therefore, without sufficient information, some users may occur with difficulties. This instruction describes the VeraCrypt installation process in Kali Linux, Linux Mint, Ubuntu, Arch Linux and BlackArch.

By analogy, the actions described here can be used for other Linux distributions. In addition to versions under Windows and Linux, there are also versions of VeraCrypt for FreeBSD and Raspbian (Raspberry Pi ARMv7).

Update: Now VeraCrypt is present in the Arch Linux repositories, to install VeraCrypt on Arch Linux, as well as distributions based on it (Manjaro, BlackArch), just run the command:

sudo pacman -S veracrypt

Script to install VeraCrypt on Linux

I wrote a script that simplifies installing VeraCrypt on Linux. The script was successfully tested in Kali Linux, Linux Mint, Ubuntu.

To use this script, create the VeraCrypt-manager.sh file, for example, as follows:

gedit VeraCrypt-manager.sh

And copy the following script into it:

The script has built-in help:

sudo bash VeraCrypt-manager.sh

The usage information will be displayed:

sudo bash VeraCrypt-manager.sh [COMMAND]
[COMMAND] can be:
	install - to install the latest VeraCrypt release
	uninstall - to uninstall VeraCrypt
	check - to check the latest VeraCrypt release

To install VeraCrypt, run the script as follows:

sudo bash VeraCrypt-manager.sh install

The script will determine the latest version and download it from the official site.

Next, the script asks:

There are 64-bit and 32-bit releases. Which version do you want to install?
	1 - for 64-bit installation
	2 - for 32-bit installation
Enter number:

Next:

There are GUI and CLI releases. Which version do you want to install?
	1 - to install a version with a graphical interface
	2 - to install the console version
Enter number:

After entering the digits, the script will run the required installer:

Click the ‘Install VeraCrypt’ button. A window with a license will open, accept it by clicking on the ‘I accept and agree to be bound by the license terns’ button:

A window with the information for removal will be displayed:

Close this window, after that another console window will open, when all the operations are completed in it, also close it:

Installation is completed. To launch VeraCrypt run:

sudo veracrypt

With the same script you can check the current latest version, and also remove VeraCrypt.

VeraCrypt manual installation

All programs, and especially concerned to security, it is extremely important to download only from official sites.

The official placements of VeraCrypt binary files are:

Download the version for Linux - this is a file with the extension .tar.bz2.

Unzip the downloaded archive. Four new files will be extracted with approximately the following names (the version number may differ):

  • veracrypt-1.21-setup-console-x64
  • veracrypt-1.21-setup-console-x86
  • veracrypt-1.21-setup-gui-x64
  • veracrypt-1.21-setup-gui-x86

x64 and x86 are for 64-bit and 32-bit OS respectively, gui is a graphical interface version, and console is a version with a command line interface. I.e., for example, to run the installation of a 64-bit version with a graphical interface, you need to run the veracrypt-1.21-setup-gui-x64 file.

To start the installer, open the console (command line), drag the desired file there, and add sudo before it to get something like this:

Press ENTER and the installation will begin.

Features of installing the console version of VeraCrypt

The console version of the installation performs in the text interface. In the beginning you need to choose:

If you select the first item, the installation will be performed. If you select the second item, the archive will be extracted.

Next, you need to press Enter to display the license. The license is long, you can use the Space bar to scroll it.

At the very end, you will enter yes, which will confirm the acceptance of the license:

VeraCrypt installation in Arch Linux/BlackArch

Both Arch Linux and BlackArch have VeraCrypt in their repositories, so the installation is extremely simple:

sudo pacman -S veracrypt

This command will install VeraCrypt with a graphical interface. To open the program:

sudo veracrypt

VeraCrypt portable for Linux

For Linux, there is no special archive with a portable version. However, any VeraCrypt installer has options to install or simply unzip the program:

An archive of the form veracrypt _*_ console_amd64.tar.gz or veracrypt _*_ amd64.tar.gz will be extracted to /tmp directory.

The /tmp directory is cleared every time you reboot your system. Therefore, the extracted file must be copied to another folder:

cp /tmp/veracrypt_*_amd64.tar.gz ~/veracrypt.tar.gz

To unzip the archive:

tar xvzf ~/veracrypt.tar.gz

Now the portable version will be available on ~/usr/bin/veracrypt path:

sudo ~/usr/bin/veracrypt

How to simultaneously have VeraCrypt versions with a console and graphical interface in Linux

To have VeraCrypt with different interfaces in you system, you can install one version as a normal program, and you can use the second version as a portable one. Either use both versions as portable.

veracrypt: error while loading shared libraries: libfuse.so.2: cannot open shared object file: No such file or directory

After installing VeraCrypt, when trying to start, an error may occur:

veracrypt: error while loading shared libraries: libfuse.so.2: cannot open shared object file: No such file or directory

As can be understood from the error text, it was not possible to load the libfuse.so.2 file due to its absence.

You can check the presence of a file in the system with the command

locate libfuse.so.2

File location examples:

  • /usr/lib/x86_64-linux-gnu/libfuse.so.2
  • /usr/lib/x86_64-linux-gnu/libfuse.so.2.9.9

If the libfuse.so.2 file is missing, then install the libfuse2 packages (possibly also libfuse3-3).

If the file is present on the system, and the libfuse2 and libfuse3-3 packages are installed, but you still get an error message, then the problem may be that the version of the libfuse2 and VeraCrypt packages do not match. For example, you installed 32-bit VeraCrypt on a 64-bit system. In this case, VeraCrypt cannot use the 64-bit version of the libfuse.so.2 file.

Ways out of this situation:

  • install the 64-bit version of VeraCrypt
  • install the 32 bit version of libfuse2

How to change the VeraCrypt interface language in Linux This step is no longer required as localization for various languages have been added to the stable version!

Currently, preliminary versions of VeraCrypt have an interface in French, German, Russian and other languages. When localization support is added to the stable version, and this will be done in VeraCrypt 1.25, then to get VeraCrypt with the interface translated into your language, it will be enough to install it as shown above.

But currently the localized VeraCrypt interface can only be obtained by installing the preview (RC) version. At the same time, localization does not work in the portable version!

Download and unpack VeraCrypt 1.25-RC1:

curl -L https://sourceforge.net/projects/veracrypt/files/VeraCrypt%20Nightly%20Builds/Linux/veracrypt-1.25-RC1-setup.tar.bz2/download > veracrypt-1.25-RC1-setup.tar.bz2
tar xvjf veracrypt-1.25-RC1-setup.tar.bz2

Run the unpacker of the version you need, in the following command the 64-bit version with a graphical interface is selected:

./veracrypt-1.25-RC1-setup-gui-x64

Choose option 1, that is “1) Install veracrypt_1.25-RC1_amd64.tar.gz”:

By the way, in another system, instead of a textual interface, a graphical one was shown, but in any case, we choose the installation.

Scroll through the license agreement and enter “yes”:

Do you accept and agree to be bound by the license terms? (yes/no): yes

In the VeraCrypt interface settings, you will not find an item to change the language – the language is set based on the value of the LANG variable. That is, VeraCrypt will choose the same language as your OS.

To change the language, you can set different values for the LANG variable:

  • Select English (default):
export LANG=en_US.UTF-8
  • Select Russian language:
export LANG=ru_RU.UTF-8

  • Select French:
export LANG=fr_FR.UTF-8

Please note that you can launch VeraCrypt from the menu or by typing the command

veracrypt

Changes to the LANG variable only have an effect on the terminal window in which they were made. That is, if you changed the LANG value in the terminal, but launched VeraCrypt through the menu, then it will ignore (not know) the LANG value and the VeraCrypt interface language will be in English.

To get rid of the error

Gtk-Message: 23:17:40.184: Failed to load module "gail"

install the libgail-common package:

sudo apt install libgail-common

Recommended for you:

2 Comments to How to install VeraCrypt on Linux

  1. Alex says:

    The script has been updated and works again!

  2. Alex says:

    New in the article:

    • fixed script – now installation of 32 versions works again
    • added error information “veracrypt: error while loading shared libraries: libfuse.so.2: cannot open shared object file: No such file or directory”

Leave a Reply

Your email address will not be published. Required fields are marked *