Unable to Update Kernel Modules after Installing NI Linux Device Drivers

Updated Sep 29, 2023

Reported In

Driver

  • NI Linux Device Drivers 2021 Q4

Other

Operating System: RHEL/CentOS 7.6

Issue Details

I download the NI Linux Device Drivers 2021Q4, then follow these installation instructions  and the NI-488.2 driver appears to have been installed without error.

However, when I try to update the kernel, it shows the following error below: 

Error! echo
Your kernel headers for kernel 3.10.0-957.el7.x86_64 cannot be found at /lib/modules/3.10.0-957.el7.x86_64/build or /lib/modules/3.10.0-957.el7.x86_64/source.


This error is as below:

error new 2.PNG

When opening GPIB Explorer  on RedHat 7.x, I received the following errors:

The attempted operation failed. libnipalu.so failed to initialize. Verify that nipalk.ko is built and loaded.

Failed to get all configured GPIB interfaces.
 

How can I resolve these errors and use GPIB Explorer?

Solution

The NI Linux Device Drivers 2021Q4 will install the latest kernel-devel which is not supported in RHEL/CentOS 7.6, so you are highly encouraged to use the newer version of RHEL or CentOS, such as 7.9 and above.

If you need to use RHEL/CentOS 7.6, firstly check the version of the system kernel release and the version of the installed kernel-devel. If they aren't the same, download the compatible version of kernel-devel and install it manually.
1. Check the kernel release version.
uname -r

2. Check the installed kernel-devel version.
yum info kernel-devel

3. Check if they are different and incompatible.
check.png

4. Download the kernel-devel-3.10.0-957.el7.x86_64.rpm online, and install it.
sudo yum install kernel-devel-3.10.0-957.el7.x86_64.rpm

5. Update the kernel modules again.
sudo dkms autoinstall

6. Open your GPIB Explorer and it should work normally.