方式一:官网prebuild版本
- sudo add-apt-repository ppa:v-launchpad-jochen-sprickerhof-de/pcl
- sudo apt-get update
- sudo apt-get install libpcl-all
方式二:安装 prebuilt DEB file for PCL 1.8 for Ubunut 16.04
会报错没有相关依赖,解决方式:
- sudo apt-get -f update
以上两种便捷方式在之后的使用中我都出现了一些问题,所以还是推荐自己编译。
第一步:安装依赖
$ sudo apt-get install cmake
$ sudo apt-get install g++
$ sudo apt-get install libboost-all-dev
$ sudo apt-get install libeigen3-dev
$ sudo apt-get install libflann-dev
$ sudo apt-get install python
$ sudo apt-get install libusb-1.0-0-dev
$ sudo apt-get install libudev-dev
$ sudo apt-get install openjdk-6-jdk
$ sudo apt-get install freeglut3-dev
$ sudo apt-get install doxygen
$ sudo apt-get install graphviz
$ sudo apt-get install libpng12-dev
$ sudo apt-get install libgtest-dev
$ sudo apt-get install libxmu-dev
$ sudo apt-get install libxi-dev
$ sudo apt-get install libpcap-dev
$ sudo apt-get install libqhull-dev
$ sudo apt-get install libvtk5-qt4-dev
$ sudo apt-get install python-vtk
$ sudo apt-get install libvtk-java
- git clone https://github.com/PointCloudLibrary/pcl.git
- cd pcl
- mkdir build
- cd build
- cmake -DCMAKE_BUILD_TYPE=None -DCMAKE_INSTALL_PREFIX=/usr/local \
- -DBUILD_GPU=ON -DBUILD_apps=ON -DBUILD_examples=ON ..
- make
- sudo make install