6.0.0-rc4Source

Installing Nt

Installing Nt from the .deb, .rpm and pacman packages for Ubuntu, Enterprise Linux and Arch Linux.

Nt is packaged for these systems. Each package is built on the system it is for, so that its dependencies and C++ runtime match.

System

Format

Packages

Ubuntu 22.04, 24.04 and 26.04

.deb

libnt6-dev and nt6-tools

Enterprise Linux 9 and 10 (RHEL, Rocky Linux, AlmaLinux)

.rpm

nt6-devel and nt6-tools

Arch Linux

.pkg.tar.zst (pacman)

nt6, with everything in one package

The development package (libnt6-dev or nt6-devel) holds the headers, the static libraries and the CMake package. The tools package holds ntmoc and ntrcc, replacements for Qt's moc and rcc, and ndoc, the documentation generator. Install both to build a Qt-style project.

The packages need a C++17 compiler and CMake 3.18 or newer to be useful, which the sections below install too. Nt is statically linked, so a program built with it needs no Nt package to run.

Getting the Packages

Packages are attached to each release on the GitHub releases page. Download the ones for your system and release. The file names carry the version, which is the one in the VERSION file of the source tree; the examples below use 6.1.0, so replace it with the version you download.

System

Files

Ubuntu 22.04

libnt6-dev_6.1.0-1~ubuntu22.04_amd64.deb, nt6-tools_6.1.0-1~ubuntu22.04_amd64.deb

Ubuntu 24.04

libnt6-dev_6.1.0-1~ubuntu24.04_amd64.deb, nt6-tools_6.1.0-1~ubuntu24.04_amd64.deb

Ubuntu 26.04

libnt6-dev_6.1.0-1~ubuntu26.04_amd64.deb, nt6-tools_6.1.0-1~ubuntu26.04_amd64.deb

Enterprise Linux 9

nt6-devel-6.1.0-1.el9.x86_64.rpm, nt6-tools-6.1.0-1.el9.x86_64.rpm

Enterprise Linux 10

nt6-devel-6.1.0-1.el10.x86_64.rpm, nt6-tools-6.1.0-1.el10.x86_64.rpm

Arch Linux

nt6-6.1.0-1-x86_64.pkg.tar.zst

With the gh command line tool, for example on Ubuntu 24.04:

gh release download v6.1.0 --repo open-nt/Nt6 --pattern '*ubuntu24.04*'

Or with curl:

curl -LO https://github.com/open-nt/Nt6/releases/download/v6.1.0/libnt6-dev_6.1.0-1~ubuntu24.04_amd64.deb
curl -LO https://github.com/open-nt/Nt6/releases/download/v6.1.0/nt6-tools_6.1.0-1~ubuntu24.04_amd64.deb

Every build of the main branch also uploads its packages as artifacts of the workflow run, named packages-ubuntu-22.04, packages-ubuntu-24.04, packages-ubuntu-26.04, packages-el9, packages-el10, packages-arch, packages-snap and packages-snap-arm64.

Note: Install the packages built for your system. A package built for another release of the same system is not tested there and is not supported.

Ubuntu 22.04, 24.04 and 26.04

From the apt repository

The Ubuntu packages of every release are also in a signed apt repository, so that apt upgrade picks up new releases. Add its key and the sources for your release (the suite is your release's code name: jammy, noble or resolute), then install:

sudo install -d -m 0755 /etc/apt/keyrings
sudo curl -fsSLo /etc/apt/keyrings/nt6.gpg https://open-nt.github.io/Nt6/apt/nt6.gpg
sudo tee /etc/apt/sources.list.d/nt6.sources > /dev/null <<EOF
Types: deb
URIs: https://open-nt.github.io/Nt6/apt
Suites: $(. /etc/os-release && echo "$VERSION_CODENAME")
Components: main
Signed-By: /etc/apt/keyrings/nt6.gpg
EOF
sudo apt update
sudo apt install g++ cmake libnt6-dev nt6-tools

The main component has final releases only. For pre-releases such as 6.1.0-rc1 as well, use Components: main testing. Until the first final release, testing is the only component with packages.

From the downloaded packages

Install the compiler and CMake, then the two packages. apt installs a local file when its name starts with ./ or a path:

sudo apt update
sudo apt install g++ cmake
sudo apt install ./libnt6-dev_6.1.0-1~ubuntu24.04_amd64.deb ./nt6-tools_6.1.0-1~ubuntu24.04_amd64.deb

Use the file names for your release. To remove them again:

sudo apt remove libnt6-dev nt6-tools

On Ubuntu 22.04 the packaged CMake is 3.22, which is new enough. The libraries are installed in /usr/lib/x86_64-linux-gnu.

Enterprise Linux 9 and 10

This covers RHEL, Rocky Linux and AlmaLinux. The packages are built on Rocky Linux and are binary compatible with the others. Install the compiler and CMake, then the two packages. dnf installs a local file when given its path, and resolves the dependencies from the repositories:

sudo dnf install gcc-c++ cmake
sudo dnf install ./nt6-devel-6.1.0-1.el9.x86_64.rpm ./nt6-tools-6.1.0-1.el9.x86_64.rpm

On Enterprise Linux 10 use the el10 files. To remove them again:

sudo dnf remove nt6-devel nt6-tools

The libraries are installed in /usr/lib64.

Arch Linux

Install the compiler and CMake, then the package. pacman -U installs a local file:

sudo pacman -S --needed gcc cmake
sudo pacman -U nt6-6.1.0-1-x86_64.pkg.tar.zst

To remove it again:

sudo pacman -R nt6

The package is built against the Arch Linux packages of the day, so install it on an up-to-date system (sudo pacman -Syu).

Snap

The snap carries the tools and the development files in one package. It is built for amd64 and arm64 (including NVIDIA Jetson) on core24 and is published to the Snap Store as open-nt6. snapd picks the build for your architecture:

sudo snap install open-nt6

Releases of a pre-release version (6.0.0-rc2, for example) are on the candidate channel until a final release reaches stable; until then install with sudo snap install open-nt6 --channel=candidate.

To install the snap of a release instead, download open-nt6_<version>_amd64.snap or open-nt6_<version>_arm64.snap from the releases page and run sudo snap install --dangerous open-nt6_<version>_<arch>.snap. Both are covered by the release provenance described at the end of this page.

The commands are open-nt6.ntmoc, open-nt6.ntrcc and open-nt6.ndoc, and ntmoc, ntrcc and ndoc once the Snap Store has granted the aliases, or after sudo snap alias open-nt6.ntmoc ntmoc, sudo snap alias open-nt6.ntrcc ntrcc and sudo snap alias open-nt6.ndoc ndoc.

The snap is strictly confined: the tools read and write files in your home directory, not elsewhere. The headers, static libraries and CMake package are in /snap/open-nt6/current/usr; to build against them, pass -DCMAKE_PREFIX_PATH=/snap/open-nt6/current/usr to CMake. Remove the snap with sudo snap remove open-nt6.

To build the snap yourself, configure Nt and build the snap target:

cmake -S . -B build
cmake --build build --target snap

This runs snapcraft in LXD or Multipass and writes open-nt6_<version>_<arch>.snap to the build directory. CI builds each architecture natively, the arm64 snap on a hosted arm64 runner. On a machine running Ubuntu 24.04 that has no container runtime, such as a Jetson, pass -DNT_SNAPCRAFT_ARGS=--destructive-mode.

Using Nt

The headers are in /usr/include/nt6, away from the headers of a Qt installation, so the two do not clash. Find Nt from CMake:

find_package(Nt6 6 REQUIRED)

add_executable(app main.cpp counter.h)
target_link_libraries(app PRIVATE Nt6::Network)   # Nt::Network works too
nt_enable_automoc(app)                            # ntmoc, for Q_OBJECT classes
nt_enable_autorcc(app)                            # ntrcc, for .qrc files

The package provides Nt6::Core, Nt6::Network, Nt6::SerialPort, Nt6::Sql, Nt6::DBus, Nt6::HttpServer, Nt6::WebSockets, Nt6::Gui, Nt6::Widgets, Nt6::Svg, Nt6::SvgWidgets, Nt6::Charts, Nt6::Qml, Nt6::Concurrent, Nt6::Test, the tools Nt6::moc, Nt6::rcc and Nt6::ndoc, and the helper functions nt_enable_automoc(), nt_wrap_cpp(), nt_enable_autorcc(), nt_add_resources() (see The Nt Resource System) and nt_add_docs(). Check the installation with:

ntmoc --version
ntrcc --version
ndoc --version

The libraries are static, so a program that links Nt6::Network also needs the OpenSSL development package, one that links Nt6::Sql that of SQLite (libsqlite3-dev), and one that links Nt6::Gui or Nt6::Widgets needs those of FreeType, fontconfig, libjpeg (optional, for JPEG images) and XCB (libssl-dev libfreetype-dev libfontconfig-dev libjpeg-dev libxcb1-dev on Ubuntu). The examples/hello and examples/widgets directories are standalone projects to start from.

Coming from Qt, read The Nt Resource System for how .qrc files are compiled with ntrcc, and Using Nt Widgets for user interfaces.

For a device without an operating system of this kind, Nt Core and Nt Network cross build as a module of the Zephyr RTOS; see Nt on Zephyr.

See Nt Brand Guide for the logo and the way to write Nt's name.

Verifying a Download

Each release has SHA-256 checksum files, SHA256SUMS-<system>.txt, next to the packages. Download the one for your system into the same directory and run:

sha256sum --check --ignore-missing SHA256SUMS-*.txt

Releases also carry SLSA level 3 build provenance, multiple.intoto.jsonl, which records that the packages were built from this repository by its GitHub workflows. Check a package with slsa-verifier:

slsa-verifier verify-artifact libnt6-dev_6.1.0-1~ubuntu24.04_amd64.deb \
    --provenance-path multiple.intoto.jsonl \
    --source-uri github.com/open-nt/Nt6 --source-tag v6.1.0

Building the Packages Yourself

Build the packages for your own system, or for all the systems above in Docker containers, from a checkout of the source:

packaging/build.sh                    # this machine; the packages are written to dist/
packaging/build-packages.sh           # every system above, in containers
packaging/build-packages.sh el9 arch  # some of them

Or use CPack directly. It picks .deb, .rpm or a pacman package from /etc/os-release:

cmake -S . -B build -DCMAKE_INSTALL_PREFIX=/usr
cmake --build build
cpack --config build/CPackConfig.cmake

Pass -G DEB, -G RPM or -G External to cpack to choose the format; External writes the pacman package. To install without a package, run cmake --install build. Remove those files again with cmake --build build --target uninstall (make uninstall), which uses the install_manifest.txt written by the install.

See also Nt Brand Guide.