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. This incompatibility results in generic hardware or internal errors while using NI hardware. Refer to 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 the following:
  • You have root permissions for the system.
  • The system has internet access.
  • The system is running the same distribution as the offline system on which you want to install.
  1. On your online system, open the Command Prompt and run the following command to install prerequisite software.
    sudo apt-get install python3 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. Restart 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 registration package you chose in Installing NI Drivers and Software on Linux Desktop.
  5. Download the offline_deb_repo.py script.
  6. Run the following command to make the script offline_deb_repo.py executable by changing the permissions.
    chmod +x offline_deb_repo.py
  7. 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 repository.
    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 looks 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 id package-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.
  8. Copy the repository to the target system.
    Note Choose a location that will not be modified accidentally.
  9. Register the repository on the system.
    Note You must disable GPG checking of repository packages so that NI software installs properly because NI does not currently sign their packages. The following instructions add the repository and disable GPG checking.
    1. 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 repository.
    2. As root, enter the following content in the file.
      deb [signed-by=/srv/offline_repo/dists/series/key.asc] file:///srv/offline_repo series ni

      Where

      • series is the Ubuntu version jammy, noble, or focal.
  10. Install the following basic Ubuntu packages on the target system.
    • dkms
    • expat
    • libopenal1
    Note You must install these packages to run the NI packages.
Complete the installation by following the online install instructions in Installing NI Products (Ubuntu).