Ubuntu20.04安装pcl详细教程⼀安装依赖
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.8 libflann-dev
sudo apt-get install libeigen3-dev
sudo apt-get install libboost-all-dev
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 libopenni-dev
sudo apt-get install libopenni2-dev
⼆安装tk
安装之前再安装⼀些依赖
sudo apt-get install libx11-dev libxext-dev libxtst-dev libxrender-dev libxmu-dev libxmuu-dev
sudo apt-get install build-essential libgl1-mesa-dev libglu1-mesa-dev
sudo apt-get install cmake cmake-gui
之后
tar -zvxf VTK-9.1.
mkdir build
cmake-gui
如下图所⽰设置前两个⽂件夹的位置,之后点击configure。
配置完成后点击generate按钮,会在build⽂件夹下⽣成⼯程⽂件选择“VTK_GROUP_QT”再次点击configure
配置完成后点击generate按钮,会在build⽂件夹下⽣成⼯程⽂件之后运⾏下列代码开始漫长等待
cd build
make -j8 #使⽤⼋核make 直接make也可以
sudo make install
三安装pcl
去github或者码云上下载pcl,之后
cd pcl
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=None ..
make (如果速度太慢⽤ make -j8 ;默认使⽤单核make,-j8启⽤8核)
sudo make install
四处理问题
问题如下:
/usr/bin/ld: 不到 -lvtkIOMPIImage
/usr/bin/ld: 不到 -lvtkIOMPIParallel
collect2: error: ld returned 1 exit status
ubuntu安装教程
make[2]: *** [io/CMakeFiles/pcl_io.dir/build.make:797:lib/libpcl_io.so.1.12.0.99] 错误 1 make[1]: *** [CMakeFiles/Makefile2:1916:io/CMakeFiles/pcl_io.dir/all] 错误 2
make[1]: *** 正在等待未完成的任务....
在上⼀步的make时遇见如上问题
详细问题见我的下⼀篇⽂章 发现问题还挺多的,再专门写⼀篇把