在对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
!!!有些同学反映没有那个文件,请先安装好pcl再来安装python-pcl
Requirements
This release has been tested on Linux Ubuntu 14.04 with
Python 2.7.6, 3.4.0, 3.5.2
pcl 1.7.0
Cython <= 0.25.2