Installing NI Products Offline (Ubuntu)
- Updated2024-09-20
- 2 minute(s) read
Installing NI Products Offline (Ubuntu)
Install NI drivers and software on Ubuntu offline.
-
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.
-
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. - Reboot your system.
-
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.
- Download the offline_deb_repo.py script.
-
Complete the steps based on your goals.
Option Description Clone the entire repo - 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.
- 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.
- 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 - Open the Command Prompt and run the following command to create
a GPG key on the root keyring.
sudo gpg --generate-key
- 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]
- Copy the long hexadecimal number on the second line. This is the key ID.
- 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. -
Copy the repository to the target system.
Note Choose a location that is not likely to be modified on accident.
-
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.
-
As root, enter the following content in the file.
deb [signed-by=/srv/offline_repo/dists/stable/key.asc] file:///srv/offline_repo
Related Information
- offline_deb_repo.py
- Installing NI Products (Ubuntu)
Install NI drivers and software on Ubuntu.