Before you can compile Tarsnap, you need certain programs and libraries:
- A C compiler (gcc or clang), make, system header files
- OpenSSL (including header files)
- zlib (including header files)
Linux only: the
(which is NOT the same as the
- (which is NOT the same as the
On many UNIX systems all the necessary packages will already be present. We provide a few sample commands for installing the required software on systems which do not include them by default:
Debian, Ubuntu, and related Linux distributions:
sudo apt-get install gcc libc6-dev make libssl-dev zlib1g-dev e2fslibs-dev
RedHat, CentOS, SuSE, Amazon Linux, and related Linux distributions:
sudo yum install gcc make glibc-devel openssl-devel zlib-devel e2fsprogs-devel
sudo apk add gcc libc-dev make openssl openssl-dev zlib-dev e2fsprogs-dev
- macOS: in addition to the normal build toolchain (probably installed via XCode), you need the OpenSSL development library. This could be installed manually, or via a package manager:
We recommend that everybody verify any downloaded tarballs with GnuPG.
Optionally, verify the key:
gpg --list-packets tarsnap-signing-key-2019.asc | grep signature :signature packet: algo 1, keyid 6B0EDCFADDF5CD05 :signature packet: algo 17, keyid 38CECA690C6A6A6EThe first keyid is the Tarsnap deb packaging key, while the second is Colin Percival's key (
0x38CECA690C6A6A6E). These keyid values should match those on a public key server search for 0x6B0EDCFADDF5CD05.
Tarsnap 2019 code signing GPG key.
Older versions are signed with
gpg --import tarsnap-signing-key-2019.asc
Installing or upgrading Tarsnap from source
These instructions are valid for installing or upgrading; upgrading simply overwrites the previous Tarsnap files.
1. Download the source tarball and signature
- If you have not done so already, download the source tarball and signed SHA256 hash file from the Tarsnap source download page.
2. Verify the files
Verify the GPG signature on the SHA256 hash file using:
gpg --decrypt tarsnap-sigs-1.0.39.asc
Verify that the SHA256 hash of the tarball matches the value in
the signed SHA256 hash file.
Linux and macOS:
shasum -a 256 tarsnap-autoconf-1.0.39.tgz
- Linux and macOS:
3. Compile the software
Extract the file and change into that directory.
tar -xzf tarsnap-autoconf-1.0.39.tgz
Configure Tarsnap for your system.
Install (or upgrade) Tarsnap.
On most systems (Linux, macOS, etc.)
sudo make install
Other systems (without
If you are installing for the first time, we suggest that you proceed to Getting started with Tarsnap. If you are upgrading to a new version of Tarsnap, then no further action is required.