ubuntu18.04安装python-pcl填坑记录 - not found lvtkNetCDF

主流程参考文章:

1、https://blog.csdn.net/zsssrs/article/details/108492750#commentBox

2、https://zhuanlan.zhihu.com/p/162277657

一句话解决:

使用1的方法成功,不过需要删除对应的VTKlib

 

使用1中的方法,碰到如下问题:

/usr/bin/ld: cannot find -lvtkNetCDF-6.3
collect2: error: ld returned 1 exit status
error: command 'x86_64-linux-gnu-g++' failed with exit status 1

如果是在anaconda的环境中,则ld位置会被改变

搜索后发现,解决办法都是定位是否包存在,若存在则软链接,不存在则sudo apt-get install libxxx-dev

可以首先尝试上述办法,以lvtkNetCDF-6.3为例,其lib名应该为:libvtknetcdf.so,对应还有libvtknetcdf-dev

 

但这并没有用,开始查看python-cpl的github时发现:

https://askubuntu.com/questions/916260/how-to-install-point-cloud-library-v1-8-pcl-1-8-0-on-ubuntu-16-04-2-lts-for

以为是安装vtk的问题。但仔细思索1的话,重新在源码的setup.py 752行中发现了:

'vtkNetCDF-' + vtk_version

删掉它,再次尝试

$ python setup.py bdist_wheel

 成功,会根据当前编译的系统/架构(linux-x86)以及python版本(cp36-cp36)生成对应whl,使用pip安装即可(conda环境下也编译通过)


使用2中的方法

conda install -c sirokujira python-pcl --channel conda-forge

碰到了conda问题:

$ conda install -c sirokujira python-pcl --channel conda-forge

CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/linux-64/repodata.json>
Elapsed: -

An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.
ConnectionError(ReadTimeoutError("HTTPSConnectionPool(host='mirrors.tuna.tsinghua.edu.cn', port=443): Read timed out.",),)

A reportable application error has occurred. Conda has prepared the above report.
If submitted, this report will be used by core maintainers to improve
future releases of conda.
Would you like conda to send this report to the core maintainers?[y/N]

输入y后再次尝试,安装成功!

python中进行验证

import pcl

报错如下:

ImportError: libboost_system.so.1.54.0: cannot open shared object file: No such file or directory

很好,2中是有记录的,使用locate查找libboost_system.so

$ locate libboost_system.so

/usr/lib/x86_64-linux-gnu/libboost_system.so
/usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1
/usr/local/cuda-10.2/nsight-systems-2019.5.2/host-linux-x64/libboost_system.so.1.64.0

软链接吧:

$ sudo ln -s libboost_system.so.1.65.1 libboost_system.so.1.54.0

还是无效= =

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值