编译python-pcl报错解决方法

在对python-pcl进行编译时报错:

Package pcl_2d-1.8 was not found in the pkg-config search path.
Perhaps you should add the directory containing `pcl_2d-1.8.pc'
to the PKG_CONFIG_PATH environment variable
Package 'pcl_2d-1.8', required by 'pcl_features-1.8', not found
Package pcl_2d-1.8 was not found in the pkg-config search path.
Perhaps you should add the directory containing `pcl_2d-1.8.pc'
to the PKG_CONFIG_PATH environment variable
Package 'pcl_2d-1.8', required by 'pcl_features-1.8', not found
Package pcl_2d-1.8 was not found in the pkg-config search path.
Perhaps you should add the directory containing `pcl_2d-1.8.pc'
to the PKG_CONFIG_PATH environment variable
Package 'pcl_2d-1.8', required by 'pcl_features-1.8', not found
Package pcl_2d-1.8 was not found in the pkg-config search path.
Perhaps you
should add the directory containing `pcl_2d-1.8.pc'
to the PKG_CONFIG_PATH environment variable
Package 'pcl_2d-1.8', required by 'pcl_features-1.8', not found
Package pcl_2d-1.8 was not found in the pkg-config search path.
Perhaps you should add the directory containing `pcl_2d-1.8.pc'
to the PKG_CONFIG_PATH environment variable
Package 'pcl_2d-1.8', required by 'pcl_features-1.8', not found
running build
running build_py
running build_ext
skipping 'pcl/_pcl_180.cpp' Cython extension (up-to-date)
building 'pcl._pcl' extension
 x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -Wdate-time -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -DEIGEN_YES_I_KNOW_SPARSE_MODULE_IS_NOT_STABLE_YET=1 -I/home/kx/.local/lib/python2.7/site-packages/numpy/core/include -I/usr/include/ni -I/usr/include/python2.7 -c pcl/_pcl_180.cpp -o build/temp.linux-x86_64-2.7/pcl/_pcl_180.o
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++
In file included from pcl/_pcl_180.cpp:455:0:
pcl/boost_shared_ptr_assign.h:1:29: fatal error: pcl/point_cloud.h: No such file or directory
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1

解决方案:修改/usr/local/lib/pkgconfig/pcl_features-1.8.pc文件,删除第10行的pcl_2d-1.8
参考:https://github.com/strawlab/python-pcl/issues/97

修改时可能会没有修改权限,权限更改命令:$ chmod 777 file

猜你喜欢

转载自blog.csdn.net/weixin_39585934/article/details/80935845
今日推荐