Getting started with PCL (1): Use apt to install pcl on ubuntu20

0. Background

It is more troublesome to install pcl using source code because there are dependent libraries vtk, flann, boost, eigen, etc., which are not easy to install, so apt is used to install it.

The following content mainly refers to the blog "[Ubuntu] Install PCL on Ubuntu (install PCL/uninstall PCL/check PCL version/PCL error handling related operations) (the most detailed in history)"

1. The version installed by apt

Use the following command to check the current ubuntu version. Use apt to install the highest pcl version. Ubuntu 20 can only install the highest pcl version 1.10.

sudo apt-get install libpcl-dev

The results are as follows
Insert image description here

2. Update apt source

Generally, this step can be ignored, but if you find that you cannot apt install pcl, then consider the source. My source (note, I am ubuntu 20, other versions of ubuntu, please find the corresponding source by yourself, it is very simple) is as follows

sudo mv /etc/apt/sources.list /etc/apt/sources.list.bak
sudo vim /etc/apt/sources.list

Save the source below

deb https://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse

# deb https://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
# deb-src https://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse

deb https://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse

The update operation is as follows

sudo apt-get update

3. apt installation command

sudo apt-get install build-essential
sudo apt-get install libpcl-dev

4. Test

apt-cache show libpcl-dev

If there is no problem, the following is version 1.10
Insert image description here

Guess you like

Origin blog.csdn.net/qq_30841655/article/details/132671028