System preparation
Necessary software
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
ext2fs/ext2_fs.hheader-
(which is NOT the same as the
linux/ext2_fs.hheader file)
-
(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
-
Alpine Linux:
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:
Download verification
We recommend that everybody verify any downloaded tarballs with GnuPG.
- Download the Tarsnap 2026 code signing GPG key.
-
Optionally, verify the key:
gpg --list-packets tarsnap-signing-key-2026.asc | grep signature :signature packet: algo 1, keyid 43FE83427863740F :signature packet: algo 1, keyid 3897F2E22E65AD3F
The first keyid is the Tarsnap source code signing key, while the second is Colin Percival's key (0x3897F2E22E65AD3F). These keyid values should match those on a public key server search for 0x43FE83427863740F. -
Import the key. Older versions are signed with
older keys.
gpg --import tarsnap-signing-key-2026.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.41.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.41.tgz
-
FreeBSD:
sha256 tarsnap-autoconf-1.0.41.tgz
gpg --decryptcommand. -
Linux and macOS:
3. Compile the software
-
Extract the file and change into that directory.
tar -xzf tarsnap-autoconf-1.0.41.tgz
cd tarsnap-autoconf-1.0.41/
-
Configure Tarsnap for your system.
./configure
-
Compile Tarsnap.
make all
-
Install (or upgrade) Tarsnap.
After installing
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.
