05-03-2016 07:13 AM
Hi, everybody.
I have successfully installed NI-VISA on Arch Linux and Ubuntu 14.04 64-bit systems.
There are several topics about introducing NI-VISA Debian-based distros, they are quite old or see unfixed problem.
That is why I decided to post a brief tutorial for installation.
On non-rpm based systems like Arch or Debians, you need a functional rpm command.
It is packed in rpm-org in AUR or alien in APT.
Also requires kernel headers, which are available as linux-headers (Arch) or linux-headers-generic (Ubuntu)
During installation, one of the post-installation scripts uses /sbin/chkconfig, which is not available in Arch or Ubuntu.
But we can fake the installer by making an empty chkconfig command:
touch /sbin/chkconfig
chmod +x /sbin/chkconfig
Additionally, there are some specific libraries to run 32-bit binaries in the case of 64-bit OS:
Once libraries are prepared, this step is straightforward.
First, download .iso image from http://www.ni.com/download/ni-visa-15.5/5848/en/
Second, mount or extract the iso file.
Then, cd to the mounted/extracted folder and run ./INSTALL --nodeps as root.
(Note: using rpm command directly to install packages is never recommended by distros. Do it at your own risk!)
After installation, rebuild the kernel drivers with:
updateNIDrivers
Note that whenever you upgrade/downgrade the Linux kernel, you need to rebuild them.
The drivers must be loaded prior to the usage of VISA libraries.
Furthremore, there are some tasks to enable full functionality.
To perform these, run
/etc/init.d/nipal start
Alternatively, on systemd-based systems (Arch Linux is), you can use this post-installation utility:
SHA256: 7d6c6a11e904eb5ff93a26f5c456aeaaa7c44000c540e27d98e3ba33656da764
Extract the contents and run post_install.sh as root.
Now you should be able to run visaconf or NIvisaic, and you will see your instruments.
Sometimes VISA might not see USB-based devices (no device on list, "Resource Busy" error, etc.)
In case that happens, try these things.
You may be able to use USB devices only with root priviliges.
This is because sufficient permission to manipulate hardwares is not given to normal users.
Try a script by NI
/usr/local/vxipnp/linux/NIvisa/USB/AddUsbRawPermissions.sh
or add permissions manually
https://github.com/python-ivi/python-usbtmc#configuring-udev
Another common situation is that a native kernel usbtmc modules is blocking access from VISA.
05-16-2016 07:44 PM
Thank you for your information!!
06-08-2016 04:36 AM
Dear t-onoz
I am trying to install NI-VISA-15.5.0 on my Laptop running on Ubuntu 16.04 LTS.
Following your steps and then installing NI-VISA , gives me error
cat: /etc/natinst/linux/linux.dir: No such file or directory
However after that the output is
Post Installation ....................................................
Updating modversions database to include newly installed drivers...
FOR PATENTS COVERING NATIONAL INSTRUMENTS PRODUCTS, REFER TO
THE PATENTS.txt FILE ON /media/akansha/NIVISA1550L AND/OR
www.ni.com/patents
******************************************************************************
* A reboot is required before attempting to use the
* NI-VISA for Linux software.
******************************************************************************
Would you like to reboot now? [yes|no]
What could possibly be the problem ?
ignoring this error and proceeding with all the steps mentioned after, when start visaconf the visa conf window loads for a moment, and then I get an error..unable to start libnipalu.so failed to initilaize and you need to run update NIDrivers...I ran updateNIDrivers from all the directories I found it in , viz., /usr/local/bin , /usr/local/natinst/nikal/ etc
When I started installing initially I did it using alien and converting and installing each package individually..It worked somehow with errors and visaconf was starting, although not identifying my tektronix MDO3014..I uninstalled the package and tried your steps.
Can you help me ?Thanks in advance
06-08-2016 12:22 PM
Dear nash85,
Seems that NI kernel modules have not been loaded.
Could you try a command sudo /etc/init.d/nipal start and run visaconf again?
09-06-2016 10:39 PM
Hello. I'm use Ubuntu 16.04 and NI-VISA 15.5. I have problem on this step:
# /etc/init.d/nipal start
modprobe: ERROR: could not insert 'nipalk': Unknown symbol in module, or unknown parameter (see dmesg)
error: nipalk failed to load
possible causes:
nipalk was not versioned for this kernel (4.4.0-36-generic)
modules are not enabled for this kernel (CONFIG_MODULES)
unresolved symbols
possible solution:
if you recently installed a new kernel or have rebooted to
a different kernel from one you were previously running then run
/usr/local/bin/updateNIDrivers
to version your NI drivers for kernel 4.4.0-36-generic
In dmesg: [ 101.942519] nikal: Unknown symbol pgprot_writecombine (err 0)
Previous steps gone normal. What you can advise me?
Thanks.
04-04-2017 06:05 PM
see arch/x86/mm/pat.c:
EXPORT_SYMBOL_GPL(pgprot_writecombine);
basicly means: not allowed for proprietary (non-gpl) kernel drivers.
See insmod(1) manpage:
"GPL only symbols are not made available to modules without a GPL compatible
license, this includes modules with no license at all."
Ergo: insmod prevents you from linking proprietary modules against gpl-only symbols.
Technically, you could force it to work ignore that, but then you'd break the license contract and thus immediately loose the license (the right to use the kernel).
IOW: illegal. (in some countries even a criminal act)
By the way: that symbol had always been gpl-only (since it's incarnation about a decade ago).
So, NI always has been using it in it's proprietary driver illegally, thus having no license to use the linux kernel at all !