How to install VeraCrypt on Linux?

10 May 2023 8 minutes Author: Lady Liberty

VeraCrypt software

VeraCrypt is software that allows you to encrypt your sensitive data with a password. You can encrypt your system drive with Windows or another system or create an encrypted local drive that you can plug in when you need and provides very strong security. VeraCrypt is the successor to TrueCrypt. VeraCrypt works with all popular operating systems – Windows, Linux and Mac OS. The program is completely free, it has an open source code, the author of the program regularly releases updates that not only fix bugs, but also bring new features and improvements. You can also use VeraCrypt to create an encrypted volume on a flash drive, on which data will be protected with a password.

That way, you’ll have a portable encrypted drive that’s highly resistant to hacking. You will not worry about the possible leakage of your confidential information, because without knowing the password, it is almost impossible to compromise data on an encrypted medium. VeraCrypt is not included in the standard repositories of popular Linux distributions. Therefore, without sufficient information, some users may have difficulties. This guide describes the process of installing VeraCrypt on 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 Windows and Linux versions, there are also versions of VeraCrypt for FreeBSD and Raspbian (Raspberry Pi ARMv7). Now VeraCrypt is present in the Arch Linux repositories, to install VeraCrypt in Arch Linux, as well as distributions based on it (Manjaro, BlackArch), it is enough to execute the command: sudo pacman -S veracrypt.

Installation using a script

I wrote a script that makes it easy to install VeraCrypt on Linux. The script has been successfully tested in Kali Linux, Linux Mint, Ubuntu. To use this script, create a VeraCrypt-manager.sh file, for example as follows:

At startup:

Usage information will be displayed:

As [TEAM] can be:

  •     install – to install the latest version of VeraCrypt

  •     uninstall – to remove VeraCrypt from your system

  •     check – to check the latest released version of VeraCrypt and the version installed on the system

To install VeraCrypt, run the script like this:

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

Next, the script will ask:

There is a 64-bit and a 32-bit version. Which version do you want to install?

  • 1 – to install 64-bit

  • 2 – to install 32-bit

Enter the number, then:

There is a GUI version and a console version. Which version would you like to install?

  • 1 – to install the version with a graphical interface

  • 2 – to install the console version

Enter the number:

Graphical interface.

After entering the numbers, the script will launch the desired installer (Screenshot 1):

Screenshot 1. Installer.

Click the “Install VeraCrypt” button. A window with the license will open, accept it by clicking the button “I accept and agree to be bound by the license terns”(Screenshot 2):

Screenshot 2. License.

A window with information to delete will be displayed (Screenshot 3):

Screenshot 3. Removal.

Close this window, after that another console window will open (Screenshot 4), when all operations are completed in it, close it as well:

Screenshot 4. Console window.

That’s it, the installation is complete. To start, execute:

Using the same script, you can check the current latest version, as well as uninstall VeraCrypt.

Starting VeraCrypt.

Manual installation of VeraCrypt

It is extremely important to download all programs, especially those related to security, only from official sites. The official locations for VeraCrypt installation files are: https://www.veracrypt.fr/en/Downloads.html or https://sourceforge.net/projects/veracrypt/ Download the Linux version is a .tar.bz2 file. Unzip the downloaded archive. Four new files will be extracted with names like these (version number may vary):

  • veracrypt-1.21-setup-gui-x64

  • veracrypt-1.21-setup-gui-x86

  • veracrypt-1.21-setup-console-x64

  • veracrypt-1.21-setup-console-x86

x64 and x86 here refer to bitness, gui to the GUI version, and console to the CLI version. That is, for example, to start the installation of the 64-bit version with a graphical interface, you need to run the file veracrypt-1.21-setup-gui-x64.

To run the installer, open the console (command line), drag the desired file there and add sudo in front of it (Screenshot 5). Press ENTER and the setup described above will begin.

Screenshot 5. Console (command line

Features of installing the console version of VeraCrypt

In the console version, the installation takes place in the text interface (Screenshot 6). At the beginning you need to choose:

Screenshot 6. Text interface.

When selecting the first item, the installation will be carried out. When choosing the second item, the archive will be removed. You will then need to press Enter to display the license. The license is long, you can use the space key to scroll through it.

At the end, you will need to enter yes (Screenshot 7), which will confirm the acceptance of the license:

Screenshot 7. Confirmation of license acceptance.

A portable version of VeraCrypt for Linux

There is no special archive with a portable version for Linux. However, any VeraCrypt installer offers the option to install or simply unzip the program (Screenshot 8):

Screenshot 8. Text interface.

An archive of the type veracrypt_*_console_amd64.tar.gz or veracrypt_*_amd64.tar.gz will be extracted to the /tmp folder. (Screenshot 9)

Screenshot 9. Extracting the archive.

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

To extract the archive:

The portable version will now be available at ~/usr/bin/veracrypt:

Installing VeraCrypt on Arch Linux/BlackArch

Both Arch Linux and BlackArch have VeraCrypt in their repositories, so installation is very easy:

This command will install the GUI version. To open the app:

How to simultaneously install console and GUI versions of VeraCrypt on Linux

To have VeraCrypt with different interfaces on your system, you can install one of the versions as a regular program, and use the second as a portable one. Or use both versions as portable.

Error

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

After installing VeraCrypt, you may get an error when you try to run it:

As you can tell from the error text, the libfuse.so.2 file could not be loaded because it is missing.

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

Examples of file locations:

If the libfuse.so.2 file is missing, install the libfuse2 packages (possibly also libfuse3-3). If the file exists on the system and the libfuse2 and libfuse3-3 packages are installed, but you still receive an error message, the problem may be that the version of the libfuse2 package and VeraCrypt 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

Currently, previous versions of VeraCrypt have an interface in Russian and other languages. When support for localizations is added to the stable version, which will be done in VeraCrypt 1.25, to get VeraCrypt with the interface translated into your language, it will be enough to install it as shown above. But now the localized interface of VeraCrypt can only be obtained by installing the previous version. At the same time, localization does not work in the portable version!

Download and extract VeraCrypt 1.25-RC1:

Run the decompressor of the version you want, the 64-bit GUI version is selected in the following command:

Unpacker

Choose option 1, i.e. “1) Install veracrypt_1.25-RC1_amd64.tar.gz” (Screenshot 10) :

Screenshot 10. Choose an option.

By the way, in another system, a graphical interface was shown instead of a text interface, but in any case, we choose the installation (Screenshot 11).

Screenshot 11. Installation.

Use the space bar to scroll through the license agreement and type “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 of the LANG variable:

Set to English (default)

Set the Russian language:

Set French:

The interface is in Russian.

The interface is in French.

Note that you can start VeraCrypt from the menu or by typing the veracrypt command.

Start VeraCrypt.

Changes to the LANG variable only affect the terminal window in which they are made. That is, if you changed the value of LANG in the terminal, but started VeraCrypt through the menu, then it will ignore (not learn) the value of LANG and the interface language of VeraCrypt will be English.

To get rid of the error

install the libgail-common package:

Other related articles
Found an error?
If you find an error, take a screenshot and send it to the bot.