Installing NI Products Offline (Ubuntu)

Install NI drivers and software on Ubuntu offline.

Notice Select NI drivers are incompatible with default IOMMU settings on Linux Kernel 6.8 and later, resulting in generic hardware or internal errors while using NI hardware. Consult Driver Errors with Ubuntu 22.04 and 24.04 New Installation or Kernel 6.8 (or Later) Upgrade for more information.
Complete the steps in Installing NI Drivers and Software on Linux Desktop and ensure you have root permissions on a system that has internet access and is running the same distribution as the offline system you want to install on.
  1. On your online system, open the Command Prompt and run the following command to install prerequisite software.

    sudo apt-get install python36 apt-mirror dpkg-dev.

  2. Run the following commands to apply the latest system updates to avoid installation issues.

    sudo apt update

    sudo apt dist-upgrade

    Note This command may update your kernel to the latest version.
  3. Reboot your system.
  4. Open the Command Prompt and run the following command to install the repository registration package.

    sudo apt install ./filename.deb

    Where

    • filename.deb is the repository definition you chose.
  5. Download the offline_deb_repo.py script.
  6. Complete the steps based on your goals.
    OptionDescription
    Clone the entire repo
    1. Check the files in the /etc/apt/sources.list.d/ directory for a file that matches the source repository to clone. For example, if the file name is ni-software-2022-focal.list the script expects the name ni-software-2022-focal.
    2. If the repository does not have a name, use the following format to specify the apt source entry. deb https://site.example.com/debian distribution component1 component2 component3. For example, deb https://download.ni.com/ni-linux-desktop/2022/Q1/deb/ni/focal focal ni.
    3. To clone the repository, run the following command from the directory that contains the script.

      ./offline_deb_repo.py repo --collapse repo-name

      Where

      repo-name is the name or apt source entry for the repo.

    Create a repo for specific products
    1. Open the Command Prompt and run the following command to create a GPG key on the root keyring.

      sudo gpg --generate-key

    2. Enter additional information as prompted.
      The result will look similar to the following example.
      pub   rsa3072 2022-03-02 [SC] [expires: 2024-03-01]BB4931F582F3BF628815C834E5E662294857752D
      uid   First Last <email@example.com>
      sub   rsa3072 2022-03-08 [E] [expires: 2024-03-01]
    3. Copy the long hexadecimal number on the second line. This is the key ID.
    4. Run the following command.

      ./offline_deb_repo.py packages --key-id key idpackage-names

      Where

      • key id is the key ID you copied in the previous step.
      • package-names is a space-separated list of the package names you want to include.
    By default, the script clones the new repository in the offline_repo subdirectory within the directory where the script runs. Pass the --output argument to specify a different location.
  7. Copy the repository to the target system.
    Note Choose a location that is not likely to be modified on accident.
  8. To disable GPG checking, create a file at the following location as root.

    /etc/apt/sources.list.d/repo-name.list

    Where

    repo-name is the name you give your repo.

  9. As root, enter the following content in the file.

    deb [signed-by=/srv/offline_repo/dists/stable/key.asc] file:///srv/offline_repo

You can now follow the online install instructions to finish the installation.