Linux Users

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-VISA does not work in wsl Ubuntu 24.04.1.

Solved!
Go to solution

I have installed ni-software-2024-noble, ni-visa, ni-visa-devel.


~$ cat /etc/os-release
PRETTY_NAME="Ubuntu 24.04.1 LTS"
NAME="Ubuntu"
VERSION_ID="24.04"
VERSION="24.04.1 LTS (Noble Numbat)"
VERSION_CODENAME=noble
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=noble
LOGO=ubuntu-logo
~$ uname -a
Linux DESKTOP-72NF22D 6.6.36.6-microsoft-standard-WSL2+ #1 SMP PREEMPT_DYNAMIC Sat Dec 21 14:22:40 CST 2024 x86_64 x86_64 x86_64 GNU/Linux
~$ sudo systemctl status nipal
× nipal.service - NI Core Driver Services
Loaded: loaded (/usr/lib/systemd/system/nipal.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Sat 2024-12-21 14:53:11 CST; 21min ago
Process: 6435 ExecStartPre=modprobe -q nipalk (code=exited, status=1/FAILURE)
Process: 6437 ExecStopPost=modprobe -r nipalk (code=exited, status=1/FAILURE)

Dec 21 14:53:11 DESKTOP-72NF22D systemd[1]: Starting nipal.service - NI Core Driver Services...
Dec 21 14:53:11 DESKTOP-72NF22D systemd[1]: nipal.service: Control process exited, code=exited, status=1/FA>
Dec 21 14:53:11 DESKTOP-72NF22D modprobe[6437]: modprobe: FATAL: Module nipalk not found.
Dec 21 14:53:11 DESKTOP-72NF22D systemd[1]: nipal.service: Failed with result 'exit-code'.
Dec 21 14:53:11 DESKTOP-72NF22D systemd[1]: Failed to start nipal.service - NI Core Driver Services.

~$ sudo dkms autoinstall
Error! Your kernel headers for kernel 6.6.36.6-microsoft-standard-WSL2+ cannot be found at /lib/modules/6.6.36.6-microsoft-standard-WSL2+/build or /lib/modules/6.6.36.6-microsoft-standard-WSL2+/source.
Please install the linux-headers-6.6.36.6-microsoft-standard-WSL2+ package or use the --kernelsourcedir option to tell DKMS where it's located.
dkms autoinstall on 6.6.36.6-microsoft-standard-WSL2+/x86_64 failed for nikal(1)
NiViPciK/24.8.0f135 autoinstall failed due to missing dependencies: nikal nipalk
ni1045tr/24.8.0f118 autoinstall failed due to missing dependencies: nikal
nicmmk/24.8.0f118 autoinstall failed due to missing dependencies: nikal
nicntdrk/24.8.0f121 autoinstall failed due to missing dependencies: nikal
nicpciek/24.8.0f117 autoinstall failed due to missing dependencies: nikal
nidimk/24.8.0f172 autoinstall failed due to missing dependencies: nikal niorbk nipalk
nimdbgk/24.8.0f145 autoinstall failed due to missing dependencies: nikal niorbk nipalk
nimru2k/24.8.0f172 autoinstall failed due to missing dependencies: nidimk nikal nimdbgk nimxdfk niorbk nipalk
nimxdfk/24.8.0f145 autoinstall failed due to missing dependencies: nikal nimdbgk niorbk nipalk
nimxik/24.8.0f119 autoinstall failed due to missing dependencies: nikal
niorbk/24.8.0f145 autoinstall failed due to missing dependencies: nikal nipalk
nipalk/24.8.0f145 autoinstall failed due to missing dependencies: nikal
nipxicidk/24.8.0f121 autoinstall failed due to missing dependencies: nikal
nipxiethernet/24.8.0f118 autoinstall failed due to missing dependencies: nikal
nipxifpk/24.8.0f123 autoinstall failed due to missing dependencies: nikal nimdbgk nimxdfk niorbk nipalk nipxirmk
nipxigpk/24.8.0f123 autoinstall failed due to missing dependencies: nikal nimdbgk nimxdfk niorbk nipalk nipxirmk
nipxim2/24.8.0f118 autoinstall failed due to missing dependencies: nikal
nipxirmk/24.8.0f123 autoinstall failed due to missing dependencies: nidimk nikal nimdbgk niorbk nipalk
nismbus/24.8.0f121 autoinstall failed due to missing dependencies: nikal
Error! One or more modules failed to install during autoinstall.
Refer to previous errors for more information.


The default installed wsl2 uses the 5.15 kernel. I think the driver and kernel version do not match, so I manually upgraded to the latest wsl kernel 6.6, but it still does not work.

Can anyone help me? Thanks!

0 Kudos
Message 1 of 4
(598 Views)

WSL does not support installing kernel modules.  At the very least, the NI-VISA PXI passport installs a kernel module.  If you don't need that passport, you could possibly install VISA without that passport to get it working.  That wouldn't be a configuration supported by NI, but it may allow you to get something working.

0 Kudos
Message 2 of 4
(560 Views)
Solution
Accepted by Summpot

The following worked for me on a WSL Ubuntu 24.04.1 install:

 

sudo apt-get install ni-visa ni-visa-devel ni-kal-

Since nearly all NI kernel modules require NI-KAL, preventing it from installing (with the - suffix) ensures that no NI kernel modules are installed.

0 Kudos
Message 3 of 4
(555 Views)

I'll try it next week, thanks for the help.

0 Kudos
Message 4 of 4
(547 Views)