PCL入门(一):ubuntu20使用apt安装pcl

本文介绍了在Ubuntu系统中使用apt方便地安装PCL(PointCloudLibrary),包括查看apt安装的最高版本、更新apt源、安装必要依赖以及测试安装的过程。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

0. 背景

使用源码安装pcl较为麻烦,因为存在依赖库vtk,flann,boost,eigen等,都不太好安装,因此采用apt方式安装。

下面内容主要参考博客《【Ubuntu】Ubuntu安装PCL(安装PCL/卸载PCL/查看PCL版本/PCL报错处理相关操作)(史上最详细)》

1. apt安装的版本

使用如下命令查看当前ubuntu版本使用apt安装的最高pcl版本,ubuntu 20最高只能安装pcl 1.10版本

sudo apt-get install libpcl-dev

结果如下
在这里插入图片描述

2. 更新apt源

一般可以忽略这一步,但是如果你发现没法apt install pcl,那么考虑源的问题,我的源(注意,我是ubuntu 20,其他版本的ubuntu请自行寻找对应的源,很简单的)如下

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

将下面的源保存

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

更新操作如下

sudo apt-get update
3. apt安装命令
sudo apt-get install build-essential
sudo apt-get install libpcl-dev
4. 测试
apt-cache show libpcl-dev

如果是没有问题的话,如下是1.10版本
在这里插入图片描述

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值