Skip navigation

Community

2744 Views 9 Replies Latest reply: Jun 8, 2012 8:01 PM by mariogiov RSS
Dan_TW Calculating status...
Currently Being Moderated

Jun 8, 2012 2:04 PM

Installing NI-VISA and PyVisa on Ubuntu 8.10 - Is it really possible?

Hi all,


 

I have been working for some time now trying to get NI-VISA and PyVisa to successfully install on Ubuntu 8.10. Ideally I would like to have these packages installed on Ubuntu 11.10 (x86_64 system architecture) running kernel version 3.0, however that seems to be out of the question at this time. I have done a fair amount of research regarding this matter and have come up with a "semi-successful" procedure that has been adopted from multiple NI forums. I apologize in advance for the lengthiness of the following log, however I find it necessary to include all steps taken since many of them are not as obvious for Linux newbies such as myself. I know that a lot of people have run into similar difficulties that I have and hopefully we can come up with a solid procedure to get these packages installed successfully. 

 

Note: These logs are for the NI-VISA and supporting software installation done on a Virtual Machine running Ubuntu 8.10 (i686 system architecture) with kernel version 2.6.27. gcc version Ubuntu 4.3.2-1buntu11. Since the alien command does not work for Ubuntu 8.10 (or at least for me), all .deb files used in the procedures were created on another Virtual Machine running Ubuntu 10.10 and then made available for download so that the alien command could be bypassed on the Virtual Machine running Ubuntu 8.10 (see attached files at the end of my post).

The following procedures were primarily referenced from: How to Install Nikal1.1+NI488.2+NiVisa4.5+PyVisa+NIdaqmxBase on Ubuntu 8.04 (Only for human beings)


 

Procedures Table of Contents:

 

Sec 1 Getting Started

Sec 1.1 Ubuntu Version Verification

Sec 2 NI VISA

Sec 2.1 Nikal Install

Sec 2.2 NI-488.2 Install

Sec 2.3 VISA Install

Sec 3 PyVisa

Sec 3.1 PyVisa Install

Sec 3.2 NIdaqmxBase Install

 


 

Sec 1 Getting Started

 

Sec 1.1 Ubuntu Version Verification

 

Verify running Ubuntu 8.04 or newer

# lsb_release -a

lab1@ubuntu:~/Desktop$ lsb_release -a

Description: Ubuntu 8.10

 

Verify kernel version 2.6.24-24-generic or newer      (The following procedures will only work for kernel versions 2.4 and 2.6)

# uname -r

lab1@ubuntu:~/Desktop$ uname -r

2.6.27-7-generic

 

Verify gcc version: gcc (GCC) 4.2.4 (Ubuntu 4.2.4-1ubuntu3) or newer

# gcc --version

lab1@ubuntu:~/Desktop$ gcc --version

gcc (Ubuntu 4.3.2-1buntu11) 4.3.2

 

Verify system architecture     (The following procedures will only work for i686/i386 system architecture)

# uname -m

lab1@ubuntu:~/Desktop$ uname -m

i686

 

Install essential Ubuntu packages

# sudo apt-get install linux-headers-2.6.27-7-generic

# sudo apt-get install alien     (Alien command will not work with Ubuntu 8.10 kernel version 2.6, or at least it doesn't work for me. May skip this step since all necessary deb files can be downloaded from their respective sections)

 

To finish change bash to sh

# cd /bin

# ln -s bash sh

 

 

 

Sec 2 NI VISA


Sec 2.1 Nikal Install

 

Download NIKAL110.iso

Create a temporary directory to mount the ISO
# mkdir /home/lab1/Desktop/tmp

Mount the ISO to the tmp directory
# cd /home/lab1/Downloads
# sudo mount -o loop NIKAL110.iso /home/lab1/Desktop/tmp

Make a directory for the file
# mkdir /home/lab1/Desktop/nikal

Copy the tmp directory over to the nikal directory
# cp -R /home/lab1/Desktop/tmp/ /home/lab1/Desktop/nikal/

Change permissions on nikal directory
# sudo chmod -R 777 /home/lab1/Desktop/nikal/

Unmount the ISO
# sudo umount /home/lab1/Desktop/tmp/

Go to the copied directory
# cd /home/lab1/Desktop/nikal/tmp

Extract the tar.gz file
# tar zxvf nikal-1.10.0f0.tar.gz
# cd rpms

Download nikali_1.10.0-1_all.deb

Move deb file to nikal/tmp/rpms directory
# cd /home/lab1/Downloads
# mv nikali_1.10.0-1_all.deb /home/lab1/Desktop/nikal/tmp/rpms

With alien change *.rpm to *.deb: # sudo alien --scripts nikali-1.10.0-f0.noarch.rpm     (Do not execute this command, instead download deb file from above, see attachments)

With dkpg command install the deb package
# cd /home/lab1/Desktop/nikal/tmp/rpms
# sudo dpkg -i nikali_1.10.0-1_all.deb

Execute the nikaliInstallerUtility.sh and nikaliPostInstall scripts
# cd /usr/local/natinst/nikal/bin
# . nikaliInstallerUtility.sh
# sudo nikaliPostInstall
lab1@ubuntu:/usr/local/natinst/nikal/bin$ sudo nikaliPostInstall
sudo: nikaliPostInstall: command not found

Run updateNIDrivers
# sudo ./updateNIDrivers
lab1@ubuntu:/usr/local/natinst/nikal/bin$ sudo ./updateNIDrivers

Configuring for linux kernel version 2.6.27-7-generic.

********************************* NOTE *********************************
Using kernel headers found in /lib/modules/2.6.27-7-generic/build.
If this does not correspond to the location of the 2.6.27-7-generic headers,
then define KERNELHEADERS in your environment to point to the location
of the kernel headers, define KERNELTARGET as the version of the
kernel for which to compile, and then rerun ./configure.
********************************* NOTE *********************************

Kernel has reparent_to_init(): no
Number of arguments for do_munmap(): 3
pte_offset function: /bin/grep: /lib/modules/2.6.27-7-generic/build/include/asm/asm-x86: No such file or directory
pte_offset_kernel()
Levels in page table: 4
Kernel has remap_pfn_range: yes
USB altsetting name: cur_altsetting
Kernel has usb_get_intf(): yes
Kernel has intf_cache member in usb_host_config: yes
Kernel has ep[] members in usb_device: yes
Kernel exports usb_set_configuration(): no
Units of USB_CTRL_GET_TIMEOUT: msec
Kernel has owner member in usb_driver: no
Kernel has put_page_testzero(): yes
Kernel has mutex method: yes
Kernel has kthread: yes
Kernel has config.h: no
Kernel has ioctl32.h: no
IRQ handlers have pt_regs: no
Kernel has work_struct and delayed_work: yes
Kernel supports fault method in vm_operations_struct: yes

Storing configuration in Makefile.in
If the values stored are incorrect they can be changed before running make.

.: 13: Makefile.in: not found
/bin/rm -rf objects
Updating NI-KAL:
NI-KAL successfully updated.
Rebooting is required to ensure that National Instruments drivers
have been successfully updated.
Would you like to reboot now? [yes|no]

When asked to Reboot? enter yes

Verify nikal module is installed and working properly
# sudo modprobe nikal
lab1@ubuntu:~$ sudo modprobe nikal

lab1@ubuntu:~$ lsmod | grep ni

nikal                  70340  0


 

 

Sec 2.2 NI-488.2 Install

 

Create a directory for NI-488.2
# mkdir /home/lab1/Desktop/NI4882

Download NI-488.2-beta-2.5

Move the tar.gz file to the NI4882 directory
# cd /home/lab1/Downloads
# mv NI-488.2-beta-2.5.1b1.tar.gz /home/lab1/Desktop/NI4882/

Extract the tar.gz file
# cd /home/lab1/Desktop/NI4882
# tar zxvf NI-488.2-beta-2.5.1b1.tar.gz
# cd NI-488.2-beta-2.5.1b1
# tar zxvf NI4882beta-2.5.1b1.tar.gz

Download labview80-rte_8.0.1-1_i386.deb
Download ni4882betai_2.5.1-b1_i386.deb
Download nikali_1.7.0-f0_all.deb
Download nipali_2.0.0-f1_i386.deb
Download nispyi_2.4.0-f0_i386.deb

Move deb files to /NI4882/NI-488.2-beta-2.5.1b1/rpms directory
# cd /home/lab1/Downloads
# mv *.deb /home/lab1/Desktop/NI4882/NI-488.2-beta-2.5.1b1/rpms/

Now change *.rpm to *.deb and install: # sudo alien -k --scripts *.rpm     (Do not execute this command, instead download deb files from above, see attachments)

With dkpg command install the deb packages
# cd /home/lab1/Desktop/NI4882/NI-488.2-beta-2.5.1b1/rpms
# sudo dpkg -i *.deb
lab1@ubuntu:~/Desktop/NI4882/NI-488.2-beta-2.5.1b1/rpms$ sudo dpkg -i *.deb
Selecting previously deselected package labview80-rte.
(Reading database ... 99850 files and directories currently installed.)
Unpacking labview80-rte (from labview80-rte_8.0.1-1_i386.deb) ...
Selecting previously deselected package ni4882betai.
Unpacking ni4882betai (from ni4882betai_2.5.1-b1_i386.deb) ...
dpkg - warning: downgrading nikali from 1.10.0-1 to 1.7.0-f0.
Preparing to replace nikali 1.10.0-1 (using nikali_1.7.0-f0_all.deb) ...
Unpacking replacement nikali ...
Selecting previously deselected package nipali.
Unpacking nipali (from nipali_2.0.0-f1_i386.deb) ...
Selecting previously deselected package nispyi.
Unpacking nispyi (from nispyi_2.4.0-f0_i386.deb) ...
Setting up labview80-rte (8.0.1-1) ...

Setting up ni4882betai (2.5.1-b1) ...

Setting up nikali (1.7.0-f0) ...

Setting up nipali (2.0.0-f1) ...

Setting up nispyi (2.4.0-f0) ...

Processing triggers for libc6 ...
ldconfig deferred processing now taking place

Execute the <deb_name>InstallerUtility.sh scripts
# cd /usr/local/natinst/nipal/bin
# . nipaliInstallerUtility.sh
# cd /usr/local/natinst/ni4882/bin
# . ni4882betaiInstallerUtility.sh
# cd /usr/local/natinst/nispy/bin
# . nispyiInstallerUtility.sh

Execute the install file
# cd /home/lab1/Desktop/NI4882/NI-488.2-beta-2.5.1b1
# sudo ./INSTALL --nodeps
lab1@ubuntu:~/Desktop/NI4882/NI-488.2-beta-2.5.1b1$ sudo ./INSTALL --nodeps       (I have excluded the license agreement from the log)
Continue? [Yn] y

Checking required install tools...
Checking installer tool versions...
rpm Not found in current path
tar 1.20
Checking dependencies...
glibc 2.8.90
Unpacking install files to /tmp/NI4882beta-2.5.1b1.install...

******************************** WARNING **************************************
* The version of gcc in the path does not match the version of gcc used to    *
* compile the currently running kernel.  This can cause unpredictable *
* behavior in kernel drivers and should be fixed. *
* gcc version: 4.3.2-1ubuntu11) *
* kernel compiled with: 4.3.2 *
******************************** WARNING **************************************
Do you accept the license? [ynq]
***************************** ERROR ******************************
* ERROR: gcc does not appear to be installed! *
* Installation of gcc is required to continue this installation. *
***************************** ERROR ******************************
.: 13: Makefile.in: not found
/bin/rm -rf objects
Updating NI-KAL:
[: 112: ==: unexpected operator
NI-KAL update failed.


ERROR: make of nikal kernel module failed, not installing kernel module.
updateNIDrivers should be called again after fixing the problem.
Logging failure...
/usr/local/bin/niSystemReport version 1.7.0f0
/bin/uname
Include the file /tmp/niSystemReport.out.gz when contacting
National Instruments for support.

Press Enter to continue through the license agreement, answer y to all
questions when prompted

When asked to Reboot? enter yes

With dkpg command re-install the nikal deb package
# cd /home/lab1/Desktop/nikal/tmp/rpms
# sudo dpkg -P nikali
lab1@ubuntu:~/Desktop/nikal/tmp/rpms$ sudo dpkg -P nikali
(Reading database ... 100762 files and directories currently installed.)
Removing nikali ...
Purging configuration files for nikali ...
dpkg - warning: while removing nikali, directory `/usr/local/natinst/nikal/src/objects' not empty so not removed.
dpkg - warning: while removing nikali, directory `/usr/local/natinst/nikal/src' not empty so not removed.
dpkg - warning: while removing nikali, directory `/usr/local/natinst/nikal' not empty so not removed.
# sudo dpkg -i nikali_1.10.0-1_all.deb

 

Execute the nikaliInstallerUtility.sh and nikaliPostInstall scripts again
# cd /usr/local/natinst/nikal/bin
# . nikaliInstallerUtility.sh
# sudo nikaliPostInstall
lab1@ubuntu:/usr/local/natinst/nikal/bin$ sudo nikaliPostInstall
sudo: nikaliPostInstall: command not found

Run updateNIDrivers
# sudo ./updateNIDrivers
lab1@ubuntu:/usr/local/natinst/nikal/bin$ sudo ./updateNIDrivers

Configuring for linux kernel version 2.6.27-7-generic.

********************************* NOTE *********************************
Using kernel headers found in /lib/modules/2.6.27-7-generic/build.
If this does not correspond to the location of the 2.6.27-7-generic headers,
then define KERNELHEADERS in your environment to point to the location
of the kernel headers, define KERNELTARGET as the version of the
kernel for which to compile, and then rerun ./configure.
********************************* NOTE *********************************

Kernel has reparent_to_init(): no
Number of arguments for do_munmap(): 3
pte_offset function: /bin/grep: /lib/modules/2.6.27-7-generic/build/include/asm/asm-x86: No such file or directory
pte_offset_kernel()
Levels in page table: 4
Kernel has remap_pfn_range: yes
USB altsetting name: cur_altsetting
Kernel has usb_get_intf(): yes
Kernel has intf_cache member in usb_host_config: yes
Kernel has ep[] members in usb_device: yes
Kernel exports usb_set_configuration(): no
Units of USB_CTRL_GET_TIMEOUT: msec
Kernel has owner member in usb_driver: no
Kernel has put_page_testzero(): yes
Kernel has mutex method: yes
Kernel has kthread: yes
Kernel has config.h: no
Kernel has ioctl32.h: no
IRQ handlers have pt_regs: no
Kernel has work_struct and delayed_work: yes
Kernel supports fault method in vm_operations_struct: yes

Storing configuration in Makefile.in
If the values stored are incorrect they can be changed before running make.

.: 13: Makefile.in: not found
/bin/rm -rf objects
Updating NI-KAL:
NI-KAL successfully updated.
Rebooting is required to ensure that National Instruments drivers
have been successfully updated.
Would you like to reboot now? [yes|no]

When asked to Reboot? enter yes

 

Verify modules nikal, nipalk, gpibrtk, and a new demon nipal are
installed and working properly
# sudo modprobe nikal

lab1@ubuntu:~$ sudo modprobe nikal

# sudo modprobe nipalk

lab1@ubuntu:~$ sudo modprobe nipalk
FATAL: Module nipalk not found.

# sudo modprobe gpibprtk

lab1@ubuntu:~$ sudo modprobe gpibprtk
FATAL: Module gpibprtk not found.

# /etc/init.d/nipal restart
lab1@ubuntu:~$ /etc/init.d/nipal restart
[: 41: ==: unexpected operator
[: 41: ==: unexpected operator
nipal: 2.6.27-7-generic kernel not supported

 


Sec 2.3 VISA Install

 

Download VISA 4.5.1

Create a temporary directory to mount the ISO
# mkdir /home/lab1/Desktop/kk

Mount the ISO to the temporary directory
# cd /home/lab1/Downloads
# sudo mount -o loop NI-VISA-4.5.1.iso /home/lab1/Desktop/kk

Make a directory for the file
# mkdir /home/lab1/Desktop/visa451

Copy the temporary directory over to the visa451 directory
# cp -R /home/lab1/Desktop/kk/ /home/lab1/Desktop/visa451/

Change permissions on visa451 directory
# sudo chmod -R 777 /home/lab1/Desktop/visa451/

Unmount the ISO
# sudo umount /home/lab1/Desktop/kk/

Go to the copied directory
# cd /home/lab1/Desktop/visa451/kk

Extract the tar.gz file
# tar zxvf nivisa-4.5.1f0.tar.gz

Create a directory to copy the .deb files
# mkdir nivisa-4.5.1

Remove the following .rpm files
# cd rpms
# rm nipalki-2.4.1-f0.x86_64.rpm
# rm nivisak-4.5.1-f0.x86_64.rpm

Download visadebfiles_pt1.zip
Download visadebfiles_pt2.zip

Move the archived deb files to /visa451/kk/rpms directory
# cd /home/lab1/Downloads
# mv visadebfiles_pt1.zip /home/lab1/Desktop/visa451/kk/rpms/
# mv visadebfiles_pt2.zip /home/lab1/Desktop/visa451/kk/rpms/

Extract the archived deb files
# cd /home/lab1/Desktop/visa451/kk/rpms
# unzip visadebfiles_pt1.zip
# unzip visadebfiles_pt2.zip

Copy the deb files into the /visa451/kk/nivisa-4.5.1 directory
# cp *.deb /home/lab1/Desktop/visa451/kk/nivisa-4.5.1

Use the alien command to change .rpm to *.deb and copy deb files to nivisa-4.5.1 directory: # sudo alien -k --scripts *.rpm; # cd /home/lab1/Desktop/visa451/kk; # cp rpm/.deb nivisa-4.5.1/     (Do not execute these 3 commands, instead download deb files from above)

Download uninstall_visa.sh script
Download install_visa.sh script

Move the uninstall and install scripts to the kk directory in visa451
# cd /home/lab1/Downloads
# mv uninstall_visa /home/lab1/Desktop/visa451/kk
# mv install_visa /home/lab1/Desktop/visa451/kk

 

Use this command inside /visa451/kk directory if prior attempts have been made to install VISA: # sudo bash uninstall_visa


Run the install script
# cd /home/lab1/Desktop/visa451/kk
# sudo bash install_visa
lab1@ubuntu:~/Desktop/visa451/kk$ sudo bash install_visa
Selecting previously deselected package labview82-rte.
(Reading database ... 100764 files and directories currently installed.)
Unpacking labview82-rte (from .../labview82-rte_8.2.1-2_i386.deb) ...
Setting up labview82-rte (8.2.1-2) ...

Processing triggers for libc6 ...
ldconfig deferred processing now taking place
Selecting previously deselected package nicvirte.
(Reading database ... 100854 files and directories currently installed.)
Unpacking nicvirte (from .../nicvirte_8.0-7_i386.deb) ...
Setting up nicvirte (8.0-7) ...

Processing triggers for libc6 ...
ldconfig deferred processing now taking place
Selecting previously deselected package nimdnsresponder.
(Reading database ... 100923 files and directories currently installed.)
Unpacking nimdnsresponder (from .../nimdnsresponder_1.1.0-f3_i386.deb) ...
Setting up nimdnsresponder (1.1.0-f3) ...

Processing triggers for libc6 ...
ldconfig deferred processing now taking place
(Reading database ... 100939 files and directories currently installed.)
Preparing to replace nipali 2.0.0-f1 (using .../nipali_2.4.1-f0_i386.deb) ...
Unpacking replacement nipali ...
Setting up nipali (2.4.1-f0) ...

Processing triggers for libc6 ...
ldconfig deferred processing now taking place
Selecting previously deselected package nipalki.
(Reading database ... 100934 files and directories currently installed.)
Unpacking nipalki (from .../nipalki_2.4.1-f0_i386.deb) ...
Setting up nipalki (2.4.1-f0) ...

/usr/local/natinst/nipal/bin/palModuleMgr.sh: 473: Syntax error: Bad for loop variable
Selecting previously deselected package nipxirmi.
(Reading database ... 100943 files and directories currently installed.)
Unpacking nipxirmi (from .../nipxirmi_1.6.0-f0_i386.deb) ...
Setting up nipxirmi (1.6.0-f0) ...

Processing triggers for libc6 ...
ldconfig deferred processing now taking place
/usr/local/natinst/nipal/bin/palModuleMgr.sh: 473: Syntax error: Bad for loop variable
/usr/local/natinst/nipal/bin/palModuleMgr.sh: 473: Syntax error: Bad for loop variable
Selecting previously deselected package niorbi.
(Reading database ... 101005 files and directories currently installed.)
Unpacking niorbi (from .../niorbi_1.9.0-f0_i386.deb) ...
dpkg - warning, overriding problem because --force enabled:
trying to overwrite `/usr/local/natinst/.nicore/etc/nicore.dir', which is also in package nimdnsresponder
Setting up niorbi (1.9.0-f0) ...

Processing triggers for libc6 ...
ldconfig deferred processing now taking place
/usr/local/natinst/nipal/bin/palModuleMgr.sh: 473: Syntax error: Bad for loop variable
Selecting previously deselected package nidimi.
(Reading database ... 101027 files and directories currently installed.)
Unpacking nidimi (from .../nidimi_1.9.2-f0_i386.deb) ...
dpkg - warning, overriding problem because --force enabled:
trying to overwrite `/usr/local/natinst/.nicore/etc/nicore.dir', which is also in package niorbi
Setting up nidimi (1.9.2-f0) ...

Processing triggers for libc6 ...
ldconfig deferred processing now taking place
/usr/local/natinst/nipal/bin/palModuleMgr.sh: 473: Syntax error: Bad for loop variable
Selecting previously deselected package nirpci.
(Reading database ... 101040 files and directories currently installed.)
Unpacking nirpci (from .../nirpci_4.1.1-f0_i386.deb) ...
dpkg - warning, overriding problem because --force enabled:
trying to overwrite `/usr/local/natinst/.nicore/etc/nicore.dir', which is also in package nidimi
Setting up nirpci (4.1.1-f0) ...

Processing triggers for libc6 ...
ldconfig deferred processing now taking place
(Reading database ... 101045 files and directories currently installed.)
Preparing to replace nispyi 2.4.0-f0 (using .../nispyi_2.6.0-f0_i386.deb) ...
Unpacking replacement nispyi ...
Setting up nispyi (2.6.0-f0) ...

Processing triggers for libc6 ...
ldconfig deferred processing now taking place
Selecting previously deselected package nivisa.
(Reading database ... 101061 files and directories currently installed.)
Unpacking nivisa (from .../nivisa_4.5.1-f0_i386.deb) ...
Setting up nivisa (4.5.1-f0) ...

Processing triggers for libc6 ...
ldconfig deferred processing now taking place
Selecting previously deselected package nivisa-config.
(Reading database ... 101144 files and directories currently installed.)
Unpacking nivisa-config (from .../nivisa-config_4.5.1-f0_i386.deb) ...
Setting up nivisa-config (4.5.1-f0) ...

Selecting previously deselected package nivisa-devel.
(Reading database ... 101151 files and directories currently installed.)
Unpacking nivisa-devel (from .../nivisa-devel_4.5.1-f0_i386.deb) ...
Setting up nivisa-devel (4.5.1-f0) ...

Selecting previously deselected package nivisak.
(Reading database ... 101886 files and directories currently installed.)
Unpacking nivisak (from .../nivisak_4.5.1-f0_i386.deb) ...
Setting up nivisak (4.5.1-f0) ...

/usr/local/natinst/nipal/bin/palModuleMgr.sh: 473: Syntax error: Bad for loop variable
/usr/local/natinst/nipal/bin/palModuleMgr.sh: 473: Syntax error: Bad for loop variable
Selecting previously deselected package nivisaserver.
(Reading database ... 101894 files and directories currently installed.)
Unpacking nivisaserver (from .../nivisaserver_4.5.1-f0_i386.deb) ...
Setting up nivisaserver (4.5.1-f0) ...

Run updateNIDrivers
# cd /usr/local/natinst/nikal/bin
# sudo ./updateNIDrivers
lab1@ubuntu:/usr/local/natinst/nikal/bin$ sudo ./updateNIDrivers

Configuring for linux kernel version 2.6.27-7-generic.

********************************* NOTE *********************************
Using kernel headers found in /lib/modules/2.6.27-7-generic/build.
If this does not correspond to the location of the 2.6.27-7-generic headers,
then define KERNELHEADERS in your environment to point to the location
of the kernel headers, define KERNELTARGET as the version of the
kernel for which to compile, and then rerun ./configure.
********************************* NOTE *********************************

Kernel has reparent_to_init(): no
Number of arguments for do_munmap(): 3
pte_offset function: /bin/grep: /lib/modules/2.6.27-7-generic/build/include/asm/asm-x86: No such file or directory
pte_offset_kernel()
Levels in page table: 4
Kernel has remap_pfn_range: yes
USB altsetting name: cur_altsetting
Kernel has usb_get_intf(): yes
Kernel has intf_cache member in usb_host_config: yes
Kernel has ep[] members in usb_device: yes
Kernel exports usb_set_configuration(): no
Units of USB_CTRL_GET_TIMEOUT: msec
Kernel has owner member in usb_driver: no
Kernel has put_page_testzero(): yes
Kernel has mutex method: yes
Kernel has kthread: yes
Kernel has config.h: no
Kernel has ioctl32.h: no
IRQ handlers have pt_regs: no
Kernel has work_struct and delayed_work: yes
Kernel supports fault method in vm_operations_struct: yes

Storing configuration in Makefile.in
If the values stored are incorrect they can be changed before running make.

.: 13: Makefile.in: not found
/bin/rm -rf objects
Updating NI-KAL:
NI-KAL successfully updated.
Rebooting is required to ensure that National Instruments drivers
have been successfully updated.
Would you like to reboot now? [yes|no]

When asked to Reboot? enter yes

Open VISA Configuration to verify install
# visaconf
lab1@ubuntu:~$ visaconf
libnipalu.so failed to initialize
Perhaps you need to run updateNIDrivers
Aborted

 


Sec 3 PyVISA

 

 

Sec 3.1 PyVisa Install

 

Download PyVISA-1.3-1.noarch.rpm

Create a directory for PyVisa and move the .rpm file to that directory
# cd /home/lab1/Downloads
# mkdir /home/lab1/Desktop/pyvisa
# mv PyVISA-1.3-1.noarch.rpm /home/lab1/Desktop/pyvisa/

Download pyvisa_1.3-1_all.deb

Move the deb file to the pyvisa directory
# cd /home/lab1/Downloads
# mv pyvisa_1.3-1_all.deb /home/lab1/Desktop/pyvisa

Now change *.rpm to *.deb and install: # sudo alien -k --scripts *.rpm     (Do not execute this command, instead download deb file from above, see attachments)

 

Download and install python package from repository
Download python-ctypes_1.0.2-5ubuntu2_i386.deb

 

Move python-ctypes to /pyvisa directory and install the package
# cd /home/lab1/Downloads
# mv python-ctypes_1.0.2-5ubuntu2_i386.deb /home/lab1/Desktop/pyvisa
# cd /home/lab1/Desktop/pyvisa
# sudo dpkg -i python-ctypes_1.0.2-5ubuntu2_i386.deb
lab1@ubuntu:~/Desktop/pyvisa$ sudo dpkg -i python-ctypes_1.0.2-5ubuntu2_i386.debSelecting previously deselected package python-ctypes.
(Reading database ... 101899 files and directories currently installed.)
Unpacking python-ctypes (from python-ctypes_1.0.2-5ubuntu2_i386.deb) ...
Setting up python-ctypes (1.0.2-5ubuntu2) ...

# sudo apt-get install python-ctypes
lab1@ubuntu:~/Desktop/pyvisa$ sudo apt-get install python-ctypes
Reading package lists... Done
Building dependency tree
Reading state information... Done
python-ctypes is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Install pyvisa
# sudo dpkg -i pyvisa_1.3-1_all.deb
lab1@ubuntu:~/Desktop/pyvisa$ sudo dpkg -i pyvisa_1.3-1_all.deb
Selecting previously deselected package pyvisa.
(Reading database ... 101975 files and directories currently installed.)
Unpacking pyvisa (from pyvisa_1.3-1_all.deb) ...
Setting up pyvisa (1.3-1) ...

 


Sec 3.2 NIdaqmxBase Install

 

Download NIdaqMXBase 3.3.0.iso
Download uninstall_daqmx
Download install_daqmx

Create a temporary directory to mount the ISO
# mkdir /home/lab1/Desktop/tmp

Mount the ISO to the tmp directory
# sudo mount -o loop nidaqmxbase-3.3.0.iso /home/lab1/Desktop/tmp

Make a directory for the file
# mkdir /home/lab1/Desktop/nidaqmxbase

Copy the tmp directory over to the nidaqmxbase directory
# cp -R /home/lab1/Desktop/tmp/ /home/lab1/Desktop/nidaqmxbase/

Change permissions on nidaqmxbase directory
# sudo chmod -R 777 /home/lab1/Desktop/nidaqmxbase/

Unmount the ISO
# sudo umount /home/lab1/Desktop/tmp/

 

Go to the Downloads directory
# cd /home/lab1/Downloads

Download labview82-rte_8.2.1-2_i386.deb
Download nidaqmxbase-board-support_3.3.0-f0_i386.deb
Download nidaqmxbase-common_3.3.0-f0_i386.deb
Download nidaqmxbase-labview2009-vis_3.3.0-f0_i386.deb
Download nidaqmxbase-labview82-vis_3.3.0-f0_i386.deb
Download nidaqmxbase-labview85-vis_3.3.0-f0_i386.deb
Download nidaqmxbase-labview86-vis_3.3.0-f0_i386.deb
Download nidaqmxbase-usb-support_3.3.0-f0_i386.deb

Move deb files to /nidaqmxbase/tmp directory
# cd /home/lab1/Downloads
# mv *.deb /home/lab1/Desktop/nidaqmxbase/tmp

Go to the copied directory
# cd /home/lab1/Desktop/nidaqmxbase/tmp

Change packages .rpm to .deb: # sudo alien -k --scripts *.rpm     (Do not execute this command, instead download deb files from above, see attachments)

Move uninstall and install scripts to same folder as .deb packages
# cd /home/lab1/Downloads
# mv uninstall_daqmx /home/lab1/Desktop/nidaqmxbase/tmp
# mv install_daqmx /home/lab1/Desktop/nidaqmxbase/tmp

Execute the installer script
# cd /home/lab1/Desktop/nidaqmxbase/tmp
# sudo bash install_daqmx
lab1@ubuntu:~/Desktop/nidaqmxbase/tmp$ sudo bash install_daqmx
Selecting previously deselected package nidaqmxbase-board-support.
(Reading database ... 102063 files and directories currently installed.)
Unpacking nidaqmxbase-board-support (from nidaqmxbase-board-support_3.3.0-f0_i386.deb) ...
Setting up nidaqmxbase-board-support (3.3.0-f0) ...
find: warning: you have specified the -maxdepth option after a non-option argument -type, but options are not positional (-maxdepth affects tests specified before it as well as those specified after it).  Please specify options before other arguments.

find: warning: you have specified the -maxdepth option after a non-option argument -type, but options are not positional (-maxdepth affects tests specified before it as well as those specified after it).  Please specify options before other arguments.

find: warning: you have specified the -maxdepth option after a non-option argument -type, but options are not positional (-maxdepth affects tests specified before it as well as those specified after it).  Please specify options before other arguments.

find: warning: you have specified the -maxdepth option after a non-option argument -type, but options are not positional (-maxdepth affects tests specified before it as well as those specified after it).  Please specify options before other arguments.

find: warning: you have specified the -maxdepth option after a non-option argument -type, but options are not positional (-maxdepth affects tests specified before it as well as those specified after it).  Please specify options before other arguments.

find: warning: you have specified the -maxdepth option after a non-option argument -type, but options are not positional (-maxdepth affects tests specified before it as well as those specified after it).  Please specify options before other arguments.

find: warning: you have specified the -maxdepth option after a non-option argument -type, but options are not positional (-maxdepth affects tests specified before it as well as those specified after it).  Please specify options before other arguments.


Processing triggers for libc6 ...
ldconfig deferred processing now taking place
Selecting previously deselected package nidaqmxbase-common.
(Reading database ... 102974 files and directories currently installed.)
Unpacking nidaqmxbase-common (from nidaqmxbase-common_3.3.0-f0_i386.deb) ...
Setting up nidaqmxbase-common (3.3.0-f0) ...
find: warning: you have specified the -maxdepth option after a non-option argument -type, but options are not positional (-maxdepth affects tests specified before it as well as those specified after it).  Please specify options before other arguments.

find: warning: you have specified the -maxdepth option after a non-option argument -type, but options are not positional (-maxdepth affects tests specified before it as well as those specified after it).  Please specify options before other arguments.


Processing triggers for libc6 ...
ldconfig deferred processing now taking place
dpkg: error processing nidaqmxbase-cinterface_3.3.0-f0_i386.deb (--install):
cannot access archive: No such file or directory
Errors were encountered while processing:
nidaqmxbase-cinterface_3.3.0-f0_i386.deb
Selecting previously deselected package nidaqmxbase-usb-support.
(Reading database ... 102989 files and directories currently installed.)
Unpacking nidaqmxbase-usb-support (from nidaqmxbase-usb-support_3.3.0-f0_i386.deb) ...
Setting up nidaqmxbase-usb-support (3.3.0-f0) ...
find: warning: you have specified the -maxdepth option after a non-option argument -type, but options are not positional (-maxdepth affects tests specified before it as well as those specified after it).  Please specify options before other arguments.


Processing triggers for libc6 ...
ldconfig deferred processing now taking place

Run updateNIDrivers
# cd /usr/local/natinst/nikal/bin
# sudo ./updateNIDrivers
lab1@ubuntu:/usr/local/natinst/nikal/bin$ sudo ./updateNIDrivers

Configuring for linux kernel version 2.6.27-7-generic.

********************************* NOTE *********************************
Using kernel headers found in /lib/modules/2.6.27-7-generic/build.
If this does not correspond to the location of the 2.6.27-7-generic headers,
then define KERNELHEADERS in your environment to point to the location
of the kernel headers, define KERNELTARGET as the version of the
kernel for which to compile, and then rerun ./configure.
********************************* NOTE *********************************

Kernel has reparent_to_init(): no
Number of arguments for do_munmap(): 3
pte_offset function: /bin/grep: /lib/modules/2.6.27-7-generic/build/include/asm/asm-x86: No such file or directory
pte_offset_kernel()
Levels in page table: 4
Kernel has remap_pfn_range: yes
USB altsetting name: cur_altsetting
Kernel has usb_get_intf(): yes
Kernel has intf_cache member in usb_host_config: yes
Kernel has ep[] members in usb_device: yes
Kernel exports usb_set_configuration(): no
Units of USB_CTRL_GET_TIMEOUT: msec
Kernel has owner member in usb_driver: no
Kernel has put_page_testzero(): yes
Kernel has mutex method: yes
Kernel has kthread: yes
Kernel has config.h: no
Kernel has ioctl32.h: no
IRQ handlers have pt_regs: no
Kernel has work_struct and delayed_work: yes
Kernel supports fault method in vm_operations_struct: yes

Storing configuration in Makefile.in
If the values stored are incorrect they can be changed before running make.

.: 13: Makefile.in: not found
/bin/rm -rf objects
Updating NI-KAL:
NI-KAL successfully updated.
Rebooting is required to ensure that National Instruments drivers
have been successfully updated.
Would you like to reboot now? [yes|no]

When asked to Reboot? enter yes

Execute FWUpdate script to update the firmware
# cd /usr/local/natinst/nidaqmxbase/bin
# sudo ./FWUpdate
lab1@ubuntu:/usr/local/natinst/nidaqmxbase/bin$ sudo ./FWUpdate
libnipalu.so failed to initialize
Perhaps you need to run updateNIDrivers
Aborted

Now probe USB devices
# cd /usr/local/natinst/nidaqmxbase/bin
# lsdaq
lab1@ubuntu:/usr/local/natinst/nidaqmxbase/bin$ lsdaq
--------------------------------
Detecting National Instruments DAQ Devices
Found the following DAQ Devices:
libnipalu.so failed to initialize
Perhaps you need to run updateNIDrivers
Aborted
--------------------------------

 

 

 

Any thoughts or comments on any of the above are greatly appreciated, especially since NI support is "limited" for Ubuntu users. I hope this information is useful for others trying to install these packages on Ubuntu.


  • mariogiov Calculating status...

    Hi Dan,

     

    Can you verify that your kernel modules are actually being compiled? It's kind of tricky to follow everything that's going on with your setup but I see you were having that problem before (in your comments from https://decibel.ni.com/content/docs/DOC-6742). If you don't successfully create the right kernel modules nothing will work.

     

    This part in particular looks like trouble:

    Storing configuration in Makefile.in

    If the values stored are incorrect they can be changed before running make.

    .: 13: Makefile.in: not found

    /bin/rm -rf objects

    Updating NI-KAL:

    NI-KAL successfully updated.

    Rebooting is required to ensure that National Instruments drivers

    have been successfully updated.

    Would you like to reboot now? [yes|no]

     

    It doesn't look like the file "Makefile.in" is being created at all, so the kernel module probably isn't being built for your system. These files are all under /usr/local/natinst/nikal/src. I'm not an expert, this seems to be how it all works:

     

    1. 'bin/updateNIDrivers' calls 'bin/installerUtility.sh', which seems to check that you have some prerequisite binaries installed and provides functions for more in-depth prereq checking.
    2. After this, 'bin/updateNIDrivers' sets about to configuring the kernel modules for NI-KAL. It calls 'src/configure'.
    3. 'src/configure' sources the 'bin/installerUtility.sh' as well, and uses its functions to check all your prerequisites more carefully (kernel version, kernel source, etc.). It should then create a file called "Makefile.in" which contains some details about where things are on your system; however, it doesn't look like it's doing that for you.
    4. The kernel modules are then compiled and installed.

     

    When I try to `make install` in this directory (src/) without the 'Makefile.in' file, the make process fails. What's confusing about your output is that it seems to think that it has succeeded. I may be following this code incorrectly, but it could be one of your issues.

     

     

    On my system (RHEL, not Ubuntu), I have a number of kernel modules  under '/usr/local/natinst/<utility>', e.g. '/usr/local/natinst/nikal' or '/usr/local/natinst/nipal'. There are also some modules installed under '/lib/modules/$(uname -r)/kernel/natinst/<utility>' where $(uname -r) is your kernel version, e.g. '3.3.7-1.fc16.i686'. These may be  somewhere else on your system (I don't know exactly where Ubuntu keeps things), but if you use the command

     

    sudo find / -name "ni*.[sk]o" -print

     

    maybe you can narrow down your search.

     

     

    Finally, are you still getting these errors?

    lab1@ubuntu:~$ sudo modprobe nipalk
    FATAL: Module nipalk not found.

    # sudo modprobe gpibprtk

    lab1@ubuntu:~$ sudo modprobe gpibprtk
    FATAL: Module gpibprtk not found.

    # /etc/init.d/nipal restart
    lab1@ubuntu:~$ /etc/init.d/nipal restart
    [: 41: ==: unexpected operator
    [: 41: ==: unexpected operator
    nipal: 2.6.27-7-generic kernel not supported

     

    There may be some more information somewhere about this and about why libnipalu.so failed to initialize. Check '/var/log/syslog' or dmesg.

     

    Mario

  • mariogiov Calculating status...

    Also, I know that lots of people love Ubuntu, but I don't know if it's worth the trouble trying to jimmy all this software onto a system for which it wasn't designed. You might consider just using RedHat or openSuse, both of which are pretty great too (maybe better!).

  • mariogiov Calculating status...

    Hey Dan,

     

    So you definitely do not have the kernel module for nipal (nipalk.ko). The script '/etc/init.d/nipal' attempts to load it from here:

    /lib/modules/$kernelVersion/kernel/natinst/nipal/nipal.ko

     

    Here is the output from when I ran '/usr/local/bin/updateNIDrivers' after installing NI-KAL v2.2.1f2:

    [workstation@localhost ~]$ sudo /usr/local/bin/updateNIDrivers

    Configuring for linux kernel version 2.6.32-220.7.1.el6.i686.

    ********************************* NOTE *********************************

    Using kernel headers found in /lib/modules/2.6.32-220.7.1.el6.i686/source.

    If this does not correspond to the location of the 2.6.32-220.7.1.el6.i686 headers,

    then define KERNELHEADERS in your environment to point to the location

    of the kernel headers, define KERNELTARGET as the version of the

    kernel for which to compile, and then rerun ./configure.

    ********************************* NOTE *********************************

    Kernel has reparent_to_init(): no

    Number of arguments for do_munmap(): 3

    pte_offset function: pte_offset_kernel()

    Levels in page table: 4

    Kernel has remap_pfn_range: yes

    Kernel has kzalloc: yes

    Kernel has chained SGL support: yes

    USB altsetting name: cur_altsetting

    Kernel has usb_get_intf(): yes

    Kernel has intf_cache member in usb_host_config: yes

    Kernel has ep[] members in usb_device: yes

    Kernel exports usb_set_configuration(): no

    Units of USB_CTRL_GET_TIMEOUT: msec

    Kernel has owner member in usb_driver: no

    Kernel has put_page_testzero(): yes

    Kernel has mutex method: yes

    Kernel has wait_for_completion_interruptible: yes

    Kernel has config.h: no

    Kernel has ioctl32.h: no

    IRQ handlers have pt_regs: no

    Kernel has work_struct and delayed_work: yes

    Kernel supports fault method in vm_operations_struct: yes

    Storing configuration in Makefile.in

    If the values stored are incorrect they can be changed before running make.

    Installing NI-KAL:

    NI-KAL successfully updated.

    Updating client modules:

    nipalk.ko successfully updated.

    niorbk.ko successfully updated.

    nidimk.ko successfully updated.

    nipxirmk.ko successfully updated.

    nimdbgk.ko successfully updated.

    nimxdfk.ko successfully updated.

    nimru2k.ko successfully updated.

    nimxpk.ko successfully updated.

    nimstsk.ko successfully updated.

    nidmxfk.ko successfully updated.

    nimsdrk.ko successfully updated.

    nisftk.ko successfully updated.

    nicdrk.ko successfully updated.

    nitiork.ko successfully updated.

    nisdigk.ko successfully updated.

    nixsrk.ko successfully updated.

    niscdk.ko successfully updated.

    niswdk.ko successfully updated.

    nistc2k.ko successfully updated.

    nistcrk.ko successfully updated.

    niesrk.ko successfully updated.

    nispdk.ko successfully updated.

    niwfrk.ko successfully updated.

    nissrk.ko successfully updated.

    nidsark.ko successfully updated.

    Rebooting is required to ensure that National Instruments drivers

    have been successfully updated.

    Would you like to reboot now? [yes|no] yes

     

    I actually am not sure I even needed to do this, as I had previously installed DAQmx-8.0.2 which comes with a version of NI-KAL. The really important thing that updateNIDrivers does is compile kernel modules for your specific kernel -- if it fails, you will not have drivers for your hardware.

     

    Also, as it states in the README for a lot of these things, the addressable memory for your system cannot be more then 4GB. If you do not limit your memory to 4096MB, you will (and did) see this:

     

    [workstation@localhost ~]$ nilsdev

    libnipalu.so failed to initialize

    Perhaps you need to run updateNIDrivers

    Aborted

     

    In your case, I think you may just not have the nipal libraries. In my case, I found this in the '/var/log/messages':

    ...

    nikal: module license 'Copyright (c) 2002-2011 National Instruments Corporation.

    ... 

    [nipal] More than 4GB of addressable memory detected.

    [nipal] This configuration is not supported.  Check the release notes for more information.

     

    You can tell your system to limit the memory available by appending your boot options, either in your grub configuration or at boot (see section 1.c.ii of this article: https://decibel.ni.com/content/docs/DOC-22110). Again, this probably isn't your issue right now, but it may come up in the future.

     

     

    I think your next step is to try to determine why your kernel modules aren't compiling/installing. It may help to examine the contents of the shell scripts you're using (under '/usr/local/natinst/nikal/src' or '/usr/local/natinst/nipal/src'). I found it helpful to search for the messages I was getting to find out which file was printing them. For instance:

     

    [workstation@localhost nikal]$ pwd

    /usr/local/natinst/nikal

    [workstation@localhost nikal]$ grep "Makefile.in" */*

    bin/installerUtility.sh:   nikalMakefile=$nikalDir/src/nikal/Makefile.in

    bin/nikaliInstallerUtility.sh:   rm -f Makefile.in

    bin/nikalKernelInstaller.sh:   . $nikalDir/src/nikal/Makefile.in

    bin/nikalKernelInstaller.sh:   . ./Makefile.in

    bin/nikalKernelInstaller.sh:# MODPATH comes from Makefile.in which was created from configure

    bin/niSystemReport:if [ ! -e $nikalDir/src/nikal/Makefile.in ]; then

    bin/niSystemReport:reportFile $nikalDir/src/nikal/Makefile.in

    bin/niSystemReport:. $nikalDir/src/nikal/Makefile.in

    src/utility.sh:   nikalMakefile=$nikalDir/src/nikal/Makefile.in

     

    Good luck and if you have more questions ask away.

     

    Mario

More Like This

  • Retrieving data ...

Bookmarked By (0)