I have Ubuntu 20.04. The LabVIEW Community Version for Linux isn't natively designed to be run on Ubuntu. How do I install it?
6 Answers
Note: This is a copy of answer from new OP question, Ask for removal if he/she posted his/her answer.
Starting of, you will have to download the ISO file from the official National Instruments site:
https://www.ni.com/es-mx/shop/labview/select-edition/labview-community-edition.html
Once the ISO file is downloaded, extract the files within it wherever you want.
Now, as mentioned earlier, as far as 2020 SP1 version, LabVIEW isn't supported for Ubuntu, the files within the extracted folder are
.rpm
, which, on itself won't install well most likely. This means you need to turn the.rpm
files to.deb
, if you have never done this, it is rather simple, you need to install Alien (in case you don't have it installed), in the terminal this command should get the job done:
sudo apt-get install alien
Once you have Alien installed, in your terminal, go to the folder where you extracted all the files from the ISO, once there, you'll perform the
.rpm
to.deb
conversion:
sudo alien *.rpm --scripts
This will convert ALL
.rpm
files to.deb
, more precisely, it will create all the corresponding.deb
files without deleting the.rpm
ones, don't worry about the latter, they will be ignored in the rest of the process.Once the alien command ends, it is time to install the files, to do so, run the next command:
sudo dpkg -i *.deb
When you do it all the
.deb
files will be installed.Here is where the real mess began when I performed this process, the installed files should be in:
/usr/local/natinst/LabVIEW-2020-64
(The last direction may vary as this post gets older, but you should find that folder in/usr/local/natinst
.I encountered some problems at this stage, because i tried to execute the ``labviewcommunity``` file with:
./labviewcommunity
Yet, when doing so, I got an error message, sorry if I cant give you the details on the precise error, don't have record of it, but I found a solution online:
In case you have problems with that solution, what I did was, downloaded this file:
https://forums.ni.com/ni/attachments/ni/140/82429/1/libniPythonInterface.tar.gz
And when you extract its content, the initial folder is named usr, you'll have to copy and paste all the contents from this file into your usr folder in exactly the same folders as they appear on the tar file.
Once you do this, labviewcommunity ran, it asked me to log in, and when I did so, Firefox told me that i was authenticated but LabVIEW said that the authentication process had failed. I got stuck trying too much, until just to see what happened, I decided to try a file named
labviewprofull
with:
./labviewprofull
And to my surprise, this worked, it opened a fully functional LabVIEW.
To create a desktop file in order to open LabView from your desktop, you can create an empty file in the text editor, and put in this:
Type=Application Terminal=false Exec=env LD_LIBRARY_PATH=/usr/local/natinst/LabVIEW-2020-64 /usr/local/natinst/LabVIEW-2020-64/labviewprofull Icon=/usr/local/natinst/LabVIEW-2020-64/etc/desktop/icons/labview.png
Don't forget to change the Icon location to wherever you have the file for the Icon of LabVIEW.
Having done so, save this file in your desktop as LabVIEW.desktop, right click on it and select Allow Launching. This should allow you to have LabVIEW community on Ubuntu. Don't forget to comment in case you have some problems, see if either me or someone can help.
I hope this turns out to be useful to someone else, good luck ;)
-
Note that if you have 64bit (which is the OP's case since Ubuntu doesn't ship in 32bit version for 2 years or so), you need to remove the
i386
RPM packages (or move them somewhere else). Otherwise thesudo alien *.rpm --scripts
will fail on a normal installation (unless the OP has added support for 32bit architecture and made sure thatalien
can handle such packages too) due to inability to process 32bit packages. Last but not least the installation appears to add shortcut (at least Xubuntu) with an incorrect path. Default is in/usr
but the shortcut uses weirdcat
call to/etc
Jun 20, 2021 at 18:49
I have installed labview for Linux using Ubuntu, and there is a script provided for installing the rpms. There is no need to convert the rpms to deb.
Once you have mounted the LabView.iso
, cd
into the Linux distribution. There you will find a ./bin/INSTALL.norpms
script.
This script is documented, but poorly.
Here is an example of how I installed an rpm file:
cd ./STATIC/LabVIEW
^---- this was my working folder for LabVIEW
mkdir /usr/local/natinst/
chmod 755 /usr/local/natinst/
Install packages (.rpm) files, Working Example:
sudo ./bin/INSTALL.norpm labview-2020-desktop-20.0.0-1.x86_64.rpm
To verify:
ls -lta /usr/local/natinst/LabVIEW-2020-64/etc/desktop/*
I would say this is an undocumented but huge simplification of the install to Ubuntu.
-
I forgot to mention, once you have mounted the LabView iso, there is a Linux folder (dir), with a second linux iso. You need to mount that second iso, and in that mounted folder you will find ./bin and its INSTALL.norpm shell script. May 27, 2021 at 15:04
-
Thanks for the very helpful instruction to the one who answered first!
It works very fine!
One think I would at is:
It is possible that you have to convert some packages (i386) at first in tgz and in the next step to deb
For me was this a help:
https://www.maketecheasier.com/convert-32bit-rpm-to-deb-64bit/
I changed to the mounted iso-directory and typed:
sudo ./bin/INSTALL.norpm labview-2020-profull-exe-20.5.0.49152-0+f0.x86_64.rpm
This installed the labviewprofull
, which is automatically symbolic linked to labview
-> no further thing to be done.
labview
can now be started as an application.
I followed the above instructions with this command sequence in the decompressed directory:
sudo rm *i386*
sudo alien *.rpm --scripts -k
sudo dpkg -i *.deb
I got these errors in response to the dpkg command:
Errors were encountered while processing:
niexfinder-base_1.0-59_all.deb
niexfinder-exe_1.0-59_amd64.deb
niexfinder-labview-2021_21.0.0-1_all.deb
niexfinder-lib-2021_21.0.0-1_amd64.deb
Nevertheless, when I entered the command:
/usr/local/natinst/LabVIEW-2021-64/labviewprofull
LabVIEW started up, and I was able to create projects, and VIs. I do not yet know how significant those errors will be.
My OS is Ubuntu 20.04
I have Ubuntu 20.04. I downloaded the LabVIEW 2021 Community Edition for Linux, which came packaged as an .iso file full of .rpm files.
After reading all the previous answers thoroughly, I wanted to believe in the ./bin/INSTALL.norpms
solution, so I tried it. I immediately ran into several problems. First, the INSTALL.norpms
script itself was buggy:
rob@machine:/media/rob/2021LVLinPro$ sudo ./bin/INSTALL.norpm labview-2021-community-exe-21.0.0.49262-0+f110.x86_64.rpm
./bin/INSTALL.norpm: 23: /media/rob/2021LVLinPro/./bin/rpm2cpio: not found
/media/rob/2021LVLinPro/./bin/cpio: premature end of archive
./bin/INSTALL.norpm: 25: /media/rob/2021LVLinPro/./bin/rpmq: not found
As you can see, the script is looking for executables in an invalid folder path that includes /./
in the middle of the path. There is a simple work-around for that one: instead of referring to the script itself with the "." shortcut for the current folder, specify the complete path the long way.
This led right away to another problem:
rob@machine:/media/rob/2021LVLinPro$ sudo /media/rob/2021LVLinPro/bin/INSTALL.norpm labview-2021-community-21.0.0.49262-0+f110.x86_64.rpm
/media/rob/2021LVLinPro/bin/INSTALL.norpm: 23: /media/rob/2021LVLinPro/bin/rpm2cpio: not found
/media/rob/2021LVLinPro/bin/cpio: premature end of archive
/media/rob/2021LVLinPro/bin/INSTALL.norpm: 25: /media/rob/2021LVLinPro/bin/rpmq: not found
The computer was saying that it couldn't find rpm2cpio
and rpmq
in the bin folder. I checked, and sure enough, there were executable files right there where they were supposed to be. That was a head-scratcher! After doing some web research, I discovered that that is the error one gets when trying to execute programs that are unable to find dynamic libraries that the executables depend upon. Hmmm....
So I did some more research, and found a wonderful article that explains what dynamically-linked libraries are, and how to find the dependencies of an executable file. I put what I'd learned to the test:
rob@machine:~/Downloads/robtest/bin$ file rpm2cpio
rpm2cpio: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.2.5, stripped
rob@machine:~/Downloads/robtest/bin$ ldd rpm2cpio
linux-gate.so.1 (0xf7fcb000)
librt.so.1 => /lib/i386-linux-gnu/librt.so.1 (0xf7fa4000)
libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xf7f81000)
libz.so.1 => not found
libbz2.so.1 => not found
libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf7d92000)
/lib/ld-linux.so.2 (0xf7fcd000)
rob@machine:~/Downloads/robtest/bin$ file rpmq
rpmq: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux.so.2, for GNU/Linux 2.2.5, stripped
rob@machine:~/Downloads/robtest/bin$ ldd rpmq
linux-gate.so.1 (0xf7f4f000)
librt.so.1 => /lib/i386-linux-gnu/librt.so.1 (0xf7f28000)
libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xf7f05000)
libz.so.1 => not found
libbz2.so.1 => not found
libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf7d16000)
/lib/ld-linux.so.2 (0xf7f51000)
To summarize what I discovered, the ./bin/INSTALL.norpms
script uses some executable files, programs, which National Instruments distributes in the ./bin
folder next to the INSTALL.norpms
script. I had a look at two of these programs, rpm2cpio
and rpmq
which were distributed as "bare" executable files, and I discovered that they are 32-bit executables that depend on several dynamic libraries, but two of those libraries, libz.so.1
and libbz2.so.1
, aren't installed on my system.
National Instruments was trying to do those of us with non-Red Hat distributions a favor by including a quick-and-dirty method of installing .rpm files, but their solution was to include a buggy script that calls programs distributed as "bare" 32-bit executables that depend on libraries they don't distribute.
Sigh. This is why Linux software is distributed as packages rather than bare executables, so that the package manager can ensure that the software that we'd like to install has all the dependencies that it needs.
My system is 64-bit. I could install 32-bit architecture, update my system to download dozens of i386 packages, and figure out what additional packages I need to install to get those two missing libraries, and then maybe it would work. But the more I learn, the less I like this quick-and-dirty approach, which is getting dirtier by the moment, and is not at all quick. This is turning into real work! So I decided to give up this approach and use Alien to convert the .rpm files to .deb files instead, so that is what I did. My experience was very similar to the one in the community wiki answer. That was so much easier, and it didn't take very long.
My advice to anyone who is wondering how to install LabVIEW Community Edition 2021 on a Ubuntu computer is to convert the .rpm files to .deb files, and install those, as described in the community wiki answer. If you're skeptical and you want to try the ./bin/INSTALL.norpms
method, great; maybe it will work perfectly for you. But if you have problems, don't say that I didn't warn you.