Ubuntu – How to install Point Cloud Library v1.8 (pcl-1.8.0) on Ubuntu 16.04.2 [LTS] for C++?

16.0417.10cserversoftware installation

I am trying to find a straight forward way to install C++ PCL v1.8 on Ubuntu 16.04.2 [LTS]


After working through the various issues individually:

This is a hybridisation of various methods to install the Point Cloud Library v1.8

Tested on a clean instance of Ubuntu Server 16.04.2 [LTS]

Aims to be an easy installation method so only includes mandatory packages and pre-requisites
—– —– —– —– —–

Also added installation of PCL 1.8.1 on Ubuntu 17.10

Best Answer


Install oracle-java8-jdk:

sudo add-apt-repository -y ppa:webupd8team/java && sudo apt update && sudo apt -y install oracle-java8-installer

Install universal pre-requisites:

sudo apt -y install g++ cmake cmake-gui doxygen mpi-default-dev openmpi-bin openmpi-common libusb-1.0-0-dev libqhull* libusb-dev libgtest-dev
sudo apt -y install git-core freeglut3-dev pkg-config build-essential libxmu-dev libxi-dev libphonon-dev libphonon-dev phonon-backend-gstreamer
sudo apt -y install phonon-backend-vlc graphviz mono-complete qt-sdk libflann-dev     

For PCL v1.8, Ubuntu 16.04.2 input the following:

sudo apt -y install libflann1.8 libboost1.58-all-dev

cd ~/Downloads
wget http://launchpadlibrarian.net/209530212/libeigen3-dev_3.2.5-4_all.deb
sudo dpkg -i libeigen3-dev_3.2.5-4_all.deb
sudo apt-mark hold libeigen3-dev

wget http://www.vtk.org/files/release/7.1/VTK-7.1.0.tar.gz
tar -xf VTK-7.1.0.tar.gz
cd VTK-7.1.0 && mkdir build && cd build
cmake ..
sudo make install

cd ~/Downloads
wget https://github.com/PointCloudLibrary/pcl/archive/pcl-1.8.0.tar.gz
tar -xf pcl-1.8.0.tar.gz
cd pcl-pcl-1.8.0 && mkdir build && cd build
cmake ..
sudo make install

cd ~/Downloads
rm libeigen3-dev_3.2.5-4_all.deb VTK-7.1.0.tar.gz pcl-1.8.0.tar.gz
sudo rm -r VTK-7.1.0 pcl-pcl-1.8.0

For PCL v1.8.1, Ubuntu 17.10 input the following:

sudo apt -y install libflann1.9 libboost1.63-all-dev libeigen3-dev

cd ~/Downloads
wget http://www.vtk.org/files/release/8.0/VTK-8.0.1.tar.gz
tar -xf VTK-8.0.1.tar.gz
cd VTK-8.0.1 && mkdir build && cd build
cmake ..
sudo make install

cd ~/Downloads
wget https://github.com/PointCloudLibrary/pcl/archive/pcl-1.8.1.tar.gz
tar -xf pcl-1.8.1.tar.gz
cd pcl-pcl-1.8.1 && mkdir build && cd build
cmake ..
sudo make install

cd ~/Downloads
rm VTK-8.0.1.tar.gz pcl-1.8.1.tar.gz
sudo rm -r VTK-8.0.1 pcl-pcl-1.8.1


cd ~
mkdir pcl-test && cd pcl-test

Create a CMakeLists.txt file:

cmake_minimum_required(VERSION 2.8 FATAL_ERROR)
find_package(PCL 1.2 REQUIRED)


add_executable(pcl-test main.cpp)
target_link_libraries(pcl-test ${PCL_LIBRARIES})

SET(COMPILE_FLAGS "-std=c++11")

Create a main.cpp file:

#include <iostream>

int main() {
    std::cout << "hello, world!" << std::endl;
    return (0);


mkdir build && cd build
cmake ..



Output -> hello, world!

This method of installation aims to be as compatible as possible and make for an easy means of getting up and running with the Point Cloud Library. This method does not include Kinect configuration which requires the prior installation of further packages before pcl can be set up.

Related Question