Installing sq

Linux

Install sq by using your Linux distribution's package manager.

Debian

sq has been part of the Debian distribution since "bookworm" (Debian 12). Up-to-date versions are part of "trixie" (Debian 13) and later.

$ sudo apt install sq

Fedora

sq is included in Fedora 40 and later. To install sq, use yum; note that it is not called sq:

$ sudo yum install sequoia-sq

macOS

There is a package containing sq in homebrew:

$ brew install sequoia-sq

The homebrew package is not called sq; that is a different program; see disambiguation below.

Windows

The easiest way to get sq on Windows is via the Windows Subsystem for Linux (WSL). By default, this installs Ubuntu Linux, which is based on Debian, so after installing WSL, follow the instructions for Debian above.

Install from source

sq is written in Rust. To compile it, you will need a recent Rust toolchain. Your Linux distribution very likely already has the relevant packages. If you don't want to use it or can't (because it's too old, or you are not using Linux), there is also the option to get the toolchain from the Rust project directly. See the rust tools documentation for further information.

Install the dependencies (Debian 12 "bookworm" / Ubuntu 24.04):

$ sudo apt install clang nettle-dev pkg-config libssl-dev capnproto libsqlite3-dev

Install the dependencies (macOS):

If you are using homebrew, install the dependencies with:

% brew install pkgconfig nettle openssl capnp

Install using cargo

After installing the dependencies, sq can be installed using cargo. Cargo will take care of downloading the source code and its dependencies (only the crates). Cargo will then compile and install the resulting binary.

$ cargo install --locked sequoia-sq

Using this method will install the latest tagged release of sq. If you are interested in HEAD (the latest revision from the git repository), please continue reading.

Get the source

Checkout the sources from the Sequoia PGP repository at gitlab.com:

$ git clone https://gitlab.com/sequoia-pgp/sequoia-sq.git

Build the binary

Change into the project directory and build the binary:

$ cd sequoia-sq
$ cargo build --release

The compiled sq binary will be found in the ./target/release subfolder; Copy or soft-link it to a convenient location.

Use cargo install to compile and install in one step (recommended):

$ cargo install --locked --path .

sq will be installed in $CARGO_HOME, usually ~/.cargo/bin. For further information and options consult cargo help install.

Check your installation

A simple "hello world"-like check is running:

$ sq version
sq 1.1.0
using sequoia-openpgp 1.22.0
with cryptographic backend Nettle 3.8 (Cv448: true, OCB: false)

Your output might be different. This check only shows that everything is in place and the binary can be executed.

Updating from source

If you installed from source, to update sq, pull the latest changes from the git repository and repeat the build process. Change into the project directory and:

$ git pull
$ cargo install --locked --path .

Disambiguation

There are other programs called sq that are not this sq: