Jetson Linux API Reference

32.7.3 Release
Building and Running

You can run the samples on Jetson without rebuilding them. However, if you modify those samples, you must rebuild them before running them.

For information on building the samples on a host Linux PC (x86), see Setting Up Cross-Platform Support.

Build and run the samples by following the procedures in this document:

  1. Export environment variables.
  2. Use Jetpack to install these programs:
    • Opencv
    • cuDNN
    • NVIDIA® TensorRT, previously known as GIE
  3. Create symbolic links.
  4. Optionally, set up cross-compiler support.
  5. Build and run the samples.

Step 1. Export environment variables

  • Export the XDisplay with the following command:
      $ export DISPLAY=:0

Step 2: Use Jetpack to install CUDA/OpenCV/cuDNN/TensorRT

If you have already installed these libraries, you can skip the following steps.

  1. Download Jetpack from the following website:
  2. Run the installation script from the host machine with the following commands:
     $ chmod +x  ./JetPack-L4T-<version>
     $ ./JetPack-L4T-<version>
  3. Select Development Environment.
  4. Select "custom" and click "clear action".
  5. Select "CUDA Toolkit", "OpenCV","cuDNN Package" and "TensorRT", and then install.
  6. For installation details, see the _installer folder.

Step 3: Create symbolic links

  • Create symbolic links with the following commands:
     $ cd /usr/lib/aarch64-linux-gnu
     $ sudo ln -sf

Step 4: Set up cross-compiler support (Optional)

Step 5: Build and run the samples

For details on each sample's structure and the APIs they use, see Sample Applications in this reference.