Skip to content

Installing TensorRT 10.x on Ubuntu 24.04

Louis Maddox edited this page Dec 15, 2025 · 10 revisions

Installing TensorRT 10.x on Ubuntu 24.04

Overview

Install NVIDIA TensorRT libraries for building/linking C++ projects or using frameworks that depend on TensorRT.

  • Note: you will also need
    • the parser library for compatibility with ONNX runtime
    • the plugin headers

Prerequisites

  • NVIDIA GPU with compatible driver
  • CUDA 12.x installed (tested with CUDA 12.4)

Installation Script

#!/bin/bash
set -e

# Download TensorRT local repo deb
wget https://developer.download.nvidia.com/compute/tensorrt/10.14.1/local_installers/nv-tensorrt-local-repo-ubuntu2204-10.14.1-cuda-12.9_1.0-1_amd64.deb

# Install the local repo package
sudo dpkg -i nv-tensorrt-local-repo-ubuntu2204-10.14.1-cuda-12.9_1.0-1_amd64.deb

# Add the GPG key
sudo cp /var/nv-tensorrt-local-repo-ubuntu2204-10.14.1-cuda-12.9/nv-tensorrt-local-*-keyring.gpg /usr/share/keyrings/

# Update apt
sudo apt update

# Install TensorRT core libraries
sudo apt install -y libnvinfer10 libnvinfer-plugin10 libnvinfer-vc-plugin10 libnvinfer-headers-dev libnvinfer-dev

# Cleanup
rm nv-tensorrt-local-repo-ubuntu2204-10.14.1-cuda-12.9_1.0-1_amd64.deb

# Verify installation
ls /usr/lib/x86_64-linux-gnu/libnvinfer*

Parser library installation:

sudo apt install -y libnvonnxparsers10 libnvonnxparsers-dev

# Verify installation
ls /usr/lib/x86_64-linux-gnu/libnvonnxparser*

Plugin headers installation:

sudo apt install libnvinfer-plugin-dev

# Verify installation
ls /usr/lib/x86_64-linux-gnu/libnvinfer_plugin*

Notes

  • The Ubuntu 22.04 package works on Ubuntu 24.04 for the core libraries
  • Do not install the tensorrt metapackage directly — it pulls in Python bindings that require Python < 3.11, which fails if your system Python is more recent (which it should be)
  • The download is ~4.5GB and takes a while
  • If you need Python bindings, install via pip separately: pip install tensorrt-cu12 (though this can be slow/hang, I didn't bother since I only need the library files themselves to build with)
  • For most build purposes (linking C++ projects, using with other frameworks), the core libraries are sufficient without Python bindings

Environment Variables

If your build system can't find TensorRT:

export TENSORRT_ROOT=/usr
export TRT_LIBPATH=/usr/lib/x86_64-linux-gnu

Links

Clone this wiki locally