Livox_viewer Ubuntu 16.04, How to install it properly and run it?

974 views
Skip to first unread message

Noli Sicad

unread,
Mar 30, 2019, 11:40:06 PM3/30/19
to Livox LiDARs
Hi Livox Team Dev,

How do you actually run this viewer?


~~~~~~~~~

./livox_viewer.sh: line 11:  5440 Illegal instruction     (core dumped) ./so/livox_viewer > /dev/null 2>&1
noli@noli-Latitude-E6320:~/Documents/LivoxViewer/Livox Viewer For Linux 16.04_x64 0.3.0$


~~~~~~~~~~~~

noli@noli-Latitude-E6320:~/Documents/LivoxViewer/Livox Viewer For Linux 16.04_x64 0.3.0$ sudo ./livox_viewer.sh
[sudo] password for noli:

noli@noli-Latitude-E6320:~/Documents/LivoxViewer/Livox Viewer For Linux 16.04_x64 0.3.0$ livox_viewer
livox_viewer: command not found

~~~~~~~~~~~~~~~~~~

Where is should I run livox_viewer? Where it is installed?


Noli

Livox Dev Team

unread,
Apr 1, 2019, 2:25:12 AM4/1/19
to Livox LiDARs
Dear Noli :
Which version of Ubuntu do you use? Livox Viewer for Ubuntu only supports Ubuntu 16.04 64-bit PC(AMD64) Desktop system currently. 

Noli Sicad

unread,
Apr 1, 2019, 4:16:40 AM4/1/19
to Livox LiDARs

Yes, that Ubuntu 16.04 64-bit PC(AMD64) Desktop system that what I am using.

Ubuntu 16.04 regardless of Desktop (Qt, Gnome, LX, etc) can load the ibraries in Ubuntu 16.04.

I think you have to package the Livox Viewer properly. Please use the debian packaging software, so we can load the the library.

Please address the errors and issues.

Noli


Noli Sicad

unread,
Apr 1, 2019, 4:32:29 AM4/1/19
to Livox LiDARs
Hi Livox Dev Team,

Please package the Livox Viewer using the Ubuntu Packaging Guideliness.


If you follow the right package we can load all the necessary libraries regarding we are using UbuntuMate, Ubuntu 16.04 (Qt) and Ubuntu Kylin is the official Chinese version of the Ubuntu

Hope to see a proper Livox Viewer in debian package.

Thanks.

Noli

Noli Sicad

unread,
Apr 1, 2019, 4:55:03 AM4/1/19
to Livox LiDARs
Hi Livox Dev Team,

Again,

./livox_viewer.sh: line 11:  5440 Illegal instruction     (core dumped) ./so/livox_viewer > /dev/null 2>&1
noli@noli-Latitude-E6320:~/
Documents/LivoxViewer/Livox Viewer For Linux 16.04_x64 0.3.0$

How do you fix this error above?


Noli

Kevin

unread,
Apr 1, 2019, 9:24:23 AM4/1/19
to Livox LiDARs
I am also having trouble running the viewer in Ubuntu 18.04.2. When I run the file in the terminal, nothing happens. It just skips to the next line and I can continue typing without any feedback of programs being installed or errors. I also can't find it in my installed software.

Is this due to the Ubuntu version I am running or am I doing something wrong?

I exactly followed the instructions in the readme file. Also tried with sudo bash, chmod but doesn't help either.

Kevin

darrel...@ncl.ac.uk

unread,
Apr 1, 2019, 11:21:00 AM4/1/19
to Livox LiDARs
Probably a silly comment but this will only run an a 64bit x86 system - it will not work on any other platform, neither will it work on a 32bit system. I have asked them to release the source code with a make file so that we can compile for a different combination. 

I don't know how new they are to linux but releasing binaries will almost always end in tears.

Ben langp

unread,
Apr 2, 2019, 4:44:47 AM4/2/19
to Livox LiDARs
They redirected the output info to /dev/null, you can edit the .sh file:

appname=`basename $0 | sed s,\.sh$,,`

dirname
=`dirname $0`
tmp
="${dirname#?}"

if [ "${dirname%$tmp}" != "/"  ]; then
    dirname
=$PWD/$dirname
fi
LD_LIBRARY_PATH
=$dirname/so
export LD_LIBRARY_PATH
./so/livox_viewer

It seems libpng12.0 missed when I test viewer in Unbuntu 18.04.
I fixed this problem by install libpng12.0 download here: https://packages.ubuntu.com/xenial/libpng12-0

Kevin

unread,
Apr 2, 2019, 5:11:40 AM4/2/19
to Livox LiDARs
Thanks Ben! Changing that last line in the .sh file and installing libpng12.0 using the bellow command line fixed it for me!

echo "deb http://mirrors.kernel.org/ubuntu/ xenial main" | sudo tee -a /etc/apt/sources.list && sudo apt-get update && sudo apt install -y --allow-unauthenticated libpng12-0

Noli Sicad

unread,
Apr 2, 2019, 7:39:36 AM4/2/19
to Livox LiDARs
Hi Livox Dev Team,

I edited the livox_viewer.sh (as showed below)

~~~~~~~~~~~
appname=`basename $0 | sed s,\.sh$,,`

dirname=`dirname $0`
tmp="${dirname#?}"

if [ "${dirname%$tmp}" != "/"  ]; then
    dirname=$PWD/$dirname
fi
LD_LIBRARY_PATH=$dirname/so
export LD_LIBRARY_PATH
./so/livox_viewer

~~~~~~~~~~~~~~~~~~

I checked my installed packages, libpng12-0 and libpng12-dev are already installed.

STILL DOES NOT WORK!!!!!!!!!!!!!!!!!!!!!!!

I am using Ubuntu 16.04. My Qt apps e.g. Kate is working.

Please solve this problem installing this livox_viewer in Ubuntu 16.04.






Ben langp

unread,
Apr 2, 2019, 10:05:35 AM4/2/19
to Livox LiDARs
Hi Noli

What is the output error of livox_viewer after you edit the .sh file? still "Illegal instruction     (core dumped)"  as you posted?  can you post the output here? so that  we can help you. Actually errors in Ubuntu are difficult to  reproduce because of the vary configurations of your system.In general, “Illegal instruction     (core dumped) ” means that the binary file format is not compatible with your system. For example, when I put the AMD64 binary file on the ARM platform, this error occurs.But obviously the problem you are experiencing is not caused by this.
 
Ben

Noli Sicad

unread,
Apr 4, 2019, 3:15:42 AM4/4/19
to Livox LiDARs

Screenshot at 2019-04-04 18:13:32.png


Noli Sicad

unread,
Apr 4, 2019, 3:18:11 AM4/4/19
to Livox LiDARs
Hi Ben,

That's the error and the system information on my Ubuntu 16.04 laptop in my earlier post above.

Noli

Noli Sicad

unread,
Apr 4, 2019, 3:35:43 AM4/4/19
to Livox LiDARs
Hi Ben,

In my other Ubuntu laptop 18.04.02LTS, there is no error but still not working.

Screenshot at 2019-04-04 18-31-04.png


Noli

Kevin

unread,
Apr 4, 2019, 3:59:22 AM4/4/19
to Livox LiDARs
That's the same issue I had on Ubuntu 18.
Removing the > /dev/null 2>&1 part in the .sh file resolved that for me.

I then got the libpng error, which I resolved as discussed earlier.

Noli Sicad

unread,
Apr 4, 2019, 4:52:38 AM4/4/19
to Livox LiDARs
Hi Kevin,

If you look at the first screenshot. That's what I done. Your
solution. I removed the "/dev/null 2>&1" But it did not work with me.

The second screenhot (18.04.02) no need to remove the "/dev/null
2>&1". There is no error. Have a look the screenshoot. It does not
work as well

Noli

Kevin

unread,
Apr 4, 2019, 5:41:28 AM4/4/19
to Livox LiDARs
Actually just try removing the  > /dev/null 2>&1 on the second Ubuntu 18 laptop, save the .sh file and run it. Then you will get an error instead of nothing, which can be fixed using the libpng install. At least that's how it worked for me. I also didn't get any response at first, until I removed the  > /dev/null 2>&1.

Noli Sicad

unread,
Apr 4, 2019, 5:59:51 AM4/4/19
to Livox LiDARs
Hi Kevin,

OK. I followed your suggestion.

Now, I got this error below

Noli

noli@noli-Latitude-E6430s:~/Documents/LivoxViewer/Livox Viewer For Linux 16.04_x64 0.3.0$ ./livox_viewer.sh
./so/livox_viewer: error while loading shared libraries: libpng12.so.0: cannot open shared object file: No such file or directory
noli@noli-Latitude-E6430s:~/Documents/LivoxViewer/Livox Viewer For Linux 16.04_x64 0.3.0$ echo "deb http://mirrors.kernel.org/ubuntu/ xenial main" | sudo tee -a /etc/apt/sources.list && sudo apt-get update && sudo apt install -y --allow-unauthenticated libpng12-0
[sudo] password for noli:
Get:2 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]   
Hit:3 http://au.archive.ubuntu.com/ubuntu bionic InRelease                    
Get:4 http://au.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]  
Hit:5 http://ppa.launchpad.net/dyatlov-igor/sierra-theme/ubuntu bionic InRelease
Get:6 http://au.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Get:7 http://packages.ros.org/ros/ubuntu bionic InRelease [4,031 B]           
Get:8 http://au.archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [572 kB]
Get:1 http://mirrors.edge.kernel.org/ubuntu xenial InRelease [247 kB]         
Get:9 http://au.archive.ubuntu.com/ubuntu bionic-updates/main i386 Packages [486 kB]
Hit:10 http://ppa.launchpad.net/webupd8team/atom/ubuntu bionic InRelease      
Get:11 http://packages.ros.org/ros/ubuntu bionic/main Sources [502 kB]        
Get:12 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages [295 kB]
Get:13 http://au.archive.ubuntu.com/ubuntu bionic-updates/main Translation-en [211 kB]
Get:14 http://au.archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [750 kB]
Get:15 http://au.archive.ubuntu.com/ubuntu bionic-updates/universe i386 Packages [739 kB]
Get:16 http://au.archive.ubuntu.com/ubuntu bionic-updates/universe Translation-en [197 kB]
Get:17 http://au.archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 Packages [6,388 B]
Get:18 http://au.archive.ubuntu.com/ubuntu bionic-updates/multiverse i386 Packages [6,548 B]
Get:19 https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/ InRelease [3,609 B]
Get:20 http://security.ubuntu.com/ubuntu bionic-security/main i386 Packages [216 kB]
Get:21 http://mirrors.edge.kernel.org/ubuntu xenial/main i386 Packages [1,196 kB]
Get:22 http://security.ubuntu.com/ubuntu bionic-security/main Translation-en [106 kB]
Get:23 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [131 kB]
Get:24 https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/ Packages [42.3 kB]
Get:25 http://security.ubuntu.com/ubuntu bionic-security/universe i386 Packages [127 kB]
Get:26 http://security.ubuntu.com/ubuntu bionic-security/universe Translation-en [73.9 kB]
Get:27 http://packages.ros.org/ros/ubuntu bionic/main i386 Packages [29.8 kB] 
Get:28 http://packages.ros.org/ros/ubuntu bionic/main amd64 Packages [450 kB] 
Get:29 http://mirrors.edge.kernel.org/ubuntu xenial/main amd64 Packages [1,201 kB]
Get:30 http://mirrors.edge.kernel.org/ubuntu xenial/main Translation-en [568 kB]
Get:31 http://mirrors.edge.kernel.org/ubuntu xenial/main Translation-en_AU [420 kB]
Fetched 8,829 kB in 32s (275 kB/s)                                            
Reading package lists... Done
Reading package lists... Done
Building dependency tree      
Reading state information... Done
The following packages were automatically installed and are no longer required:
  cython fltk1.3-doc fluid fonts-lato freeglut3 freeglut3-dev gazebo9
  gazebo9-common gazebo9-plugin-base google-mock libassimp-dev libassuan-dev
  libavcodec-dev libavdevice-dev libavdevice57 libavfilter-dev libavformat-dev
  libavresample-dev libavutil-dev libboost-all-dev libboost-chrono-dev
  libboost-container-dev libboost-context-dev libboost-coroutine-dev
  libboost-exception-dev libboost-fiber-dev libboost-graph-dev
  libboost-graph-parallel-dev libboost-iostreams-dev libboost-locale-dev
  libboost-log-dev libboost-math-dev libboost-mpi-dev libboost-mpi-python-dev
  libboost-numpy-dev libboost-python-dev libboost-random-dev
  libboost-serialization-dev libboost-stacktrace-dev libboost-test-dev
  libboost-timer-dev libboost-tools-dev libboost-type-erasure-dev
  libboost-wave-dev libbullet-dev libbullet2.87 libccd-dev libccd2 libcharls1
  libdc1394-22-dev libexif-dev libexif-doc libflann-dev libflann1.9
  libfltk-cairo1.3 libfltk-forms1.3 libfltk-gl1.3 libfltk-images1.3 libfltk1.3
  libfltk1.3-dev libfreeimage-dev libgazebo9 libgazebo9-dev libgdcm2-dev
  libgdcm2.8 libgl2ps-dev libgl2ps1.4 libgles2-mesa-dev libgpg-error-dev
  libgpgme-dev libgphoto2-dev libgraphviz-dev libgtk2.0-dev libgts-dev
  libgvc6-plugins-gtk libhdf5-mpi-dev libhdf5-openmpi-100 libhdf5-openmpi-dev
  libignition-cmake-dev libignition-common libignition-common-dev
  libignition-fuel-tools1-1 libignition-fuel-tools1-dev libignition-math4
  libignition-math4-dev libignition-msgs libignition-msgs-dev
  libignition-transport4 libignition-transport4-dev libilmbase-dev
  libjsoncpp-dev liblept5 libnetcdf-c++4 libnetcdf-cxx-legacy-dev libogg-dev
  libopenal-data libopenal-dev libopenal1 libopencv-calib3d-dev
  libopencv-calib3d3.2 libopencv-contrib-dev libopencv-contrib3.2
  libopencv-core-dev libopencv-core3.2 libopencv-dev libopencv-features2d-dev
  libopencv-features2d3.2 libopencv-flann-dev libopencv-flann3.2
  libopencv-highgui-dev libopencv-highgui3.2 libopencv-imgcodecs-dev
  libopencv-imgcodecs3.2 libopencv-imgproc-dev libopencv-imgproc3.2
  libopencv-ml-dev libopencv-ml3.2 libopencv-objdetect-dev
  libopencv-objdetect3.2 libopencv-photo-dev libopencv-photo3.2
  libopencv-shape-dev libopencv-shape3.2 libopencv-stitching-dev
  libopencv-stitching3.2 libopencv-superres-dev libopencv-superres3.2
  libopencv-ts-dev libopencv-video-dev libopencv-video3.2
  libopencv-videoio-dev libopencv-videoio3.2 libopencv-videostab-dev
  libopencv-videostab3.2 libopencv-viz-dev libopencv-viz3.2 libopencv3.2-java
  libopencv3.2-jni libopenexr-dev libopenni-dev libopenni-sensor-pointclouds0
  libopenni0 libopenni2-0 libopenni2-dev libpcl-apps1.8 libpcl-common1.8
  libpcl-dev libpcl-features1.8 libpcl-filters1.8 libpcl-io1.8
  libpcl-kdtree1.8 libpcl-keypoints1.8 libpcl-ml1.8 libpcl-octree1.8
  libpcl-outofcore1.8 libpcl-people1.8 libpcl-recognition1.8
  libpcl-registration1.8 libpcl-sample-consensus1.8 libpcl-search1.8
  libpcl-segmentation1.8 libpcl-stereo1.8 libpcl-surface1.8 libpcl-tracking1.8
  libpcl-visualization1.8 libpostproc-dev libprotobuf-dev libprotoc-dev
  libprotoc10 libqt5concurrent5 libqt5designercomponents5 libqt5opengl5
  libqt5opengl5-dev libqt5positioning5 libqt5qml5 libqt5quick5
  libqt5quickparticles5 libqt5quicktest5 libqt5quickwidgets5 libqt5sensors5
  libqt5webchannel5 libqt5webkit5 libqt5webkit5-dev libqtpropertybrowser4
  libqwt-headers libqwt-qt5-6 libqwt-qt5-dev libraw1394-dev libraw1394-tools
  libruby2.5 libsdformat6 libsdformat6-dev libsdl2-2.0-0 libsimbody-dev
  libsimbody3.5v5 libsocket++1 libspnav0 libswresample-dev libswscale-dev
  libtar-dev libtar0 libtbb-dev libtbb2 libtesseract4 libtheora-dev
  liburdfdom-dev liburdfdom-headers-dev liburdfdom-model-state
  liburdfdom-sensor liburdfdom-world libusb-1.0-0-dev libusb-1.0-doc
  libvtk6-dev libvtk6-java libvtk6-jni libvtk6-qt-dev libvtk6.3 libvtk6.3-qt
  libxdot4 libxmu-dev libxmu-headers libxss-dev libxt-dev libyaml-cpp-dev
  libyaml-cpp0.5v5 libyaml-dev libzip-dev libzmq3-dev linux-headers-4.15.0-39
  linux-headers-4.15.0-39-generic linux-image-4.15.0-39-generic
  linux-modules-4.15.0-39-generic linux-modules-extra-4.15.0-39-generic
  opencv-data openni-utils protobuf-compiler python-attr python-autobahn
  python-automat python-cbor python-click python-colorama
  python-concurrent.futures python-constantly python-defusedxml python-gnupg
  python-hyperlink python-incremental python-lz4 python-mpi4py python-nacl
  python-netifaces python-opencv python-opengl python-pam python-psutil
  python-pyasn1-modules python-pydot python-pyqt5.qtopengl python-pyqt5.qtsvg
  python-pyqt5.qtwebkit python-qrcode python-serial python-service-identity
  python-snappy python-trie python-trollius python-twisted python-twisted-bin
  python-twisted-core python-txaio python-u-msgpack python-ubjson python-vtk6
  python-wsaccel python-wxtools python-zope.interface qt5-assistant qt5-qmake
  qt5-qmake-bin qt5-qmltooling-plugins qtbase5-dev qtbase5-dev-tools
  qtdeclarative5-dev qttools5-dev qttools5-dev-tools qttools5-private-dev rake
  ros-melodic-angles ros-melodic-class-loader ros-melodic-cmake-modules
  ros-melodic-cpp-common ros-melodic-gazebo-dev ros-melodic-gl-dependency
  ros-melodic-media-export ros-melodic-python-qt-binding
  ros-melodic-qt-dotgraph ros-melodic-qwt-dependency
  ros-melodic-ros-environment ros-melodic-rosbag-migration-rule
  ros-melodic-rosboost-cfg ros-melodic-roscpp-core
  ros-melodic-roscpp-serialization ros-melodic-roscpp-traits
  ros-melodic-roslint ros-melodic-roslz4 ros-melodic-rostime ros-melodic-smach
  ros-melodic-smclib ros-melodic-urdf-parser-plugin ros-melodic-urdfdom-py
  ros-melodic-webkit-dependency ros-melodic-xmlrpcpp ruby ruby-did-you-mean
  ruby-minitest ruby-net-telnet ruby-power-assert ruby-test-unit ruby2.5
  rubygems-integration sbcl sdformat-sdf tcl-dev tcl-vtk6 tcl8.6-dev tk-dev
  tk8.6-dev ttf-dejavu-core vtk6 x11proto-dri2-dev x11proto-gl-dev
  x11proto-scrnsaver-dev
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
  libpng12-0
0 to upgrade, 1 to newly install, 0 to remove and 152 not to upgrade.
Need to get 116 kB of archives.
After this operation, 285 kB of additional disk space will be used.
Get:1 http://mirrors.edge.kernel.org/ubuntu xenial/main amd64 libpng12-0 amd64 1.2.54-1ubuntu1 [116 kB]
Fetched 116 kB in 2s (68.6 kB/s)
Selecting previously unselected package libpng12-0:amd64.
(Reading database ... 355075 files and directories currently installed.)
Preparing to unpack .../libpng12-0_1.2.54-1ubuntu1_amd64.deb ...
Unpacking libpng12-0:amd64 (1.2.54-1ubuntu1) ...
noli@noli-Latitude-E6430s:~/Documents/LivoxViewer/Livox Viewer For Linux 16.04_x64 0.3.0$ ./livox_viewer.sh
./livox_viewer.sh: line 11:  3841 Illegal instruction     (core dumped) ./so/livox_viewer
noli@noli-Latitude-E6430s:~/Documents/LivoxViewer/Livox Viewer For Linux 16.04_x64 0.3.0$

totor...@gmail.com

unread,
Dec 14, 2019, 7:14:28 AM12/14/19
to Livox LiDARs
hi Noli ,
I'm also exeperiencing this problem and get the same error output as you had ,have you solved this problem now ?
Message has been deleted

totor...@gmail.com

unread,
Dec 19, 2019, 1:29:50 AM12/19/19
to Livox LiDARs
okay i've figured out why this problem happens, it's about CPU ability 
if your cpu doesn't support avx2 instruction,  you'll fail to launch livox viewer.
to check whether your cpu supports avx2 , open  /proc/cpuinfo , if you can see "avx2" tag(not avx)  behind the "flag" prefix, it means you have avx2 cpu support
Reply all
Reply to author
Forward
0 new messages