Ubuntu18.04安装Open3D c++

一、Open3D安装

git clone --recursive https://github.com/intel-isl/Open3D.git
cd Open3D
mkdir build
cd build
cmake -DBUILD_SHARED_LIBS=ON -DCMAKE_INSTALL_PREFIX=${HOME}/open3d_install ..
make install -j 8

细节详见https://blog.csdn.net/qq_37859760/article/details/121426198

二、遇到的问题

1.dpkg-deb: error: ‘/tmp/libudev1_237-3ubuntu10.53_amd64.deb’ is not a Debian format archive

运行

util/install_deps_ubuntu.sh

出现下列提示错误:

dpkg-deb: error: '/tmp/libudev1_237-3ubuntu10.53_amd64.deb' is not a Debian format archive
dpkg: error processing archive /tmp/libudev1_237-3ubuntu10.53_amd64.deb (--install):
 dpkg-deb --control subprocess returned error exit status 2
Errors were encountered while processing:
 /tmp/libudev1_237-3ubuntu10.53_amd64.deb

这是因为libudev1_237-3ubuntu10.53_amd64.deb已经不是官方最新版本,不进行提供。需要编辑install_deps_ubuntu.sh,找到

	if [ "$(uname -m)" == "aarch64" ]; then
        curl http://ports.ubuntu.com/ubuntu-ports/pool/main/s/systemd/libudev1_237-3ubuntu10.53_arm64.deb -o /tmp/libudev1_237-3ubuntu10.53_arm64.deb
        $SUDO dpkg -i /tmp/libudev1_237-3ubuntu10.53_arm64.deb
    else
        curl http://archive.ubuntu.com/ubuntu/pool/main/s/systemd/libudev1_237-3ubuntu10.53_amd64.deb -o /tmp/libudev1_237-3ubuntu10.53_amd64.deb
        $SUDO dpkg -i /tmp/libudev1_237-3ubuntu10.53_amd64.deb
    fi

将libudev1_237-3ubuntu10.56_amd64.deb修改为当前ubuntu的最新版本,具体版本号在http://archive.ubuntu.com/ubuntu/pool/main/s/systemd/中可以查到,本文环境即2022年9月提供的版本号为libudev1_237-3ubuntu10.56_amd64.deb

2、make file时出现recipe for target ‘all’ failed

取消激活conda的环境,就可以正常的make file

conda deactivate

原理详见https://blog.csdn.net/weixin_45723524/article/details/119219481

3、解决GitHub的raw.githubusercontent.com无法连接问题

sudo vi /etc/hosts

添加

# GitHub Start
52.74.223.119 github.com
192.30.253.119 gist.github.com
54.169.195.247 api.github.com
185.199.111.153 assets-cdn.github.com
151.101.76.133 raw.githubusercontent.com
151.101.108.133 user-images.githubusercontent.com
151.101.76.133 gist.githubusercontent.com
151.101.76.133 cloud.githubusercontent.com
151.101.76.133 camo.githubusercontent.com
151.101.76.133 avatars0.githubusercontent.com
151.101.76.133 avatars1.githubusercontent.com
151.101.76.133 avatars2.githubusercontent.com
151.101.76.133 avatars3.githubusercontent.com
151.101.76.133 avatars4.githubusercontent.com
151.101.76.133 avatars5.githubusercontent.com
151.101.76.133 avatars6.githubusercontent.com
151.101.76.133 avatars7.githubusercontent.com
151.101.76.133 avatars8.githubusercontent.com
# GitHub End

原理详见https://blog.csdn.net/laoxuan2011/article/details/106177126/
后续补充:如果后续出现网络连接问题,可以考虑删除上述新增内容

4、第一章中参考的安装步骤的代码编译失败,open3d::registration not declared

这是因为Open3d的版本问题,如果只是测试的话可以参考https://github.com/isl-org/open3d-cmake-find-package

git clone https://github.com/intel-isl/open3d-cmake-find-package.git
cd open3d-cmake-find-package
mkdir build
cd build
cmake -DOpen3D_ROOT=${HOME}/open3d_install ..
make -j 8
./Draw

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
版本包含的 JEP(Java/JDK Enhancement Proposals,JDK 增强提案)比 Java 12 和 13 加起来的还要多。总共 16 个新特性如下: 305:Pattern Matching for instanceof (Preview) 为 instanceof 运算符引入模式匹配(预览阶段) 通过模式匹配,开发者可以用更简洁和更安全的方式来表达通用的程序逻辑。instanceof 运算符的模式匹配支持从对象中按条件来提取组件,此语言特性目前处于预览阶段。 343:Packaging Tool (Incubator) 打包工具(孵化阶段) 创建一个用于打包独立 Java 应用程序的工具。 345:NUMA-Aware Memory Allocation for G1 针对 G1 的 NUMA-Aware 内存分配 通过实现 NUMA-aware 内存分配,提升 G1 在大型机器上的性能。 349:JFR Event Streaming JFR 事件流 暴露 JDK Flight Recorder 数据以进行连续监视。 352:Non-Volatile Mapped Byte Buffers 非易失性映射的字节缓冲 非易失性映射的字节缓冲将添加新的 JDK 特定文件映射模式,该模式允许 FileChannel API 用于创建引用非易失性内存(NVM)的 MappedByteBuffer 实例。 358:Helpful NullPointerExceptions 改进 NullPointerExceptions,通过准确描述哪些变量为 null 来提高 JVM 生成的异常的可用性。该提案的作者希望为开发人员和支持人员提供有关程序为何异常终止的有用信息,并通过更清楚地将动态异常与静态程序代码相关联来提高对程序的理解。 359:Records (Preview) Records 提供了一种紧凑的语法来声明类,以帮助开发者写出更简洁的代码,这些类是浅层不可变数据(shallowly immutable data)的透明拥有者。该特性主要用在特定领域的类,这些类主要用于保存数据,不提供领域行为。 361:Switch Expressions (Standard) Switch Expressions 在 JDK 12 与 13 中都是预览状态,现在在 JDK 14 中已成为稳定特性。switch 表达式扩展了 switch 语句,使其不仅可以作为语句(statement),还可以作为表达式(expression),并且两种写法都可以使用传统的 switch 语法,或者使用简化的“case L ->”模式匹配语法作用于不同范围并控制执行流。这些更改将简化日常编码工作,并为 switch 中的模式匹配做好准备。 362:Deprecate the Solaris and SPARC Ports 弃用 Solaris 和 SPARC 端口 弃用 Solaris/SPARC, Solaris/x64 和 Linux/SPARC 端口,以便在未来的版本进行移除。 363:Remove the Concurrent Mark Sweep (CMS) Garbage Collector 移除 CMS(Concurrent Mark-Sweep) 垃圾回收器。 364:ZGC on macOS 将 ZGC 垃圾回收器移植到 macOS。 365:ZGC on Windows 将 ZGC 垃圾回收器移植到 Windows。 366:Deprecate the ParallelScavenge + SerialOld GC Combination 弃用 ParallelScavenge + SerialOld GC 的垃圾回收算法组合。 367:Remove the Pack200 Tools and API 移除 Pack200 工具和 API 删除 java.util.jar 包中的 pack200 和 unpack200 工具以及 Pack200 API。 368:Text Blocks (Second Preview) 文本块特性(Text Blocks)与常见的 Python"""any input"""特性一样,它支持多行字符串文字,可以不需要使用大多数转义序列,并以一种可预测的方式自动设置字符串格式,同时可以让开发人员控制格式。虽然这不是特别复杂的特性,但对于开发中想将 HTML 代码引入 Java 来说是极大的便利,代码可

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值