Ubuntu 安装 PCL

 Ubuntu16.04之后安装pcl可以直接apt-get

sudo apt-get install libpcl-dev pcl-tools   //但是目前只能安装1.7,更高版本参照一下步骤

安装之前,准备一些依赖库,如果某个依赖库安装过,跳过即可,看好在安装,切记不能安装多个不同版本的库!!!

     sudo apt-get update
     sudo apt-get install git build-essential linux-libc-dev
     sudo apt-get install cmake cmake-gui 
     sudo apt-get install libusb-1.0-0-dev libusb-dev libudev-dev
     sudo apt-get install mpi-default-dev openmpi-bin openmpi-common  
     sudo apt-get install libflann1.9 libflann-dev
     sudo apt-get install libeigen3-dev
     sudo apt-get install libboost-all-dev
     sudo apt-get install libvtk5.10-qt4 libvtk5.10 libvtk5-dev  //最好在官网下载最新版,编译完成,详情见 https://www.cnblogs.com/haijian/p/12417017.html
     sudo apt-get install libqhull* libgtest-dev
     sudo apt-get install freeglut3-dev pkg-config
     sudo apt-get install libxmu-dev libxi-dev 
     sudo apt-get install mono-complete
     sudo apt-get install qt-sdk openjdk-11-jdk openjdk-11-jre

 克隆PCL

     git clone https://github.com/PointCloudLibrary/pcl.git  //如果需要指定版本,打开网址,选择版本,指定源码下载

打开pcl文件夹,进行编译

    cd pcl
    mkdir build
    cd build
    cmake -DCMAKE_BUILD_TYPE=None -DCMAKE_INSTALL_PREFIX=/usr \
          -DBUILD_GPU=ON -DBUILD_apps=ON -DBUILD_examples=ON \
          -DCMAKE_INSTALL_PREFIX=/usr ..
    sudo make -j4
    sudo make install

安装完成

 

----------补加-----------

Cmake安装可能出现问题,安装的另一种方法:

(1)官网下载压缩包

https://cmake.org/download/

(2)解压

(3)软连接

sudo mv cmake-3.12.2 /opt/cmake
sudo ln -sf /opr/cmake/bin/* /usr/bin/

(4)测试

cmake --version 
posted @ 2018-03-30 19:38  HaijianYang  阅读(2846)  评论(0编辑  收藏  举报