Ubuntu18.04安装Open3D c++
记录一些安装Open3D的参考资料
·
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)