关于ubuntu 16.04下 PCL库使用时的一些问题:

1.  libvtkRenderingPythonTkWidgets.so 不存在的问题:

报错:

-- The imported target "vtkRenderingPythonTkWidgets" references the file
   "/usr/lib/x86_64-linux-gnu/libvtkRenderingPythonTkWidgets.so"
but this file does not exist.  Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/cmake/vtk-6.2/VTKTargets.cmake"
but not all the files it references.

 

问题所在:

/usr/lib/x86_64-linux-gnu/libvtkRenderingPythonTkWidgets.so

   libvtkRenderingPythonTkWidgets.so 这个文件在/usr/lib/x86_64-linux-gnu/ 目录下不存在

解决方法:

   首先查看python-vtk6是否安装:

ls -l  /usr/lib/python2.7/dist-packages/vtk/libvtkRendering*

   如果没有该文件,那么执行:

sudo apt-get install puthon-vtk6

   如果显示结果有,则已经安装,问题就是程序所需文件不在那个目录,那么创建软连接即可:   

sudo ln -s /usr/lib/python2.7/dist-packages/vtk/libvtkRenderingPythonTkWidgets.x86_64-linux-gnu.so /usr/lib/x86_64-linux-gnu/libvtkRenderingPythonTkWidgets.so

   注意,其中libvtkRenderingPythonTkWidgets.x86_64-linux-gnu.so 这个文件名字可能不是这样子,只需要改成上一步判断是否安装时候时候显示的文件名。

   

      至此,这个问题得到解决。

2. vtk不存在的问题

报错:

-- The imported target "vtk" references the file
   "/usr/bin/vtk"
but this file does not exist.  Possible reasons include:
* The file was deleted, renamed, or moved to another location.
* An install or uninstall procedure did not complete successfully.
* The installation package was faulty and contained
   "/usr/lib/cmake/vtk-6.2/VTKTargets.cmake"
but not all the files it references.

问题所在:

      ubuntu下,vtk是vtk6,所以创建 vtk6到vtk的软连接即可

解决方法:

sudo ln -s /usr/bin/vtk6 /usr/bin/vtk

至此。这个问题得到解决。

list(REMOVE_ITEM PCL_LIBRARIES "vtkproj4")

3.找不到

报错提示:

/usr/bin/ld: 找不到 -lvtkproj4

问题所在:

不明,一些博主发现这是一个属于ubuntu16.04的bug

解决方法:

先安装:

sudo apt-get install libproj-dev

在修复CMakeLists.txt中的一个链接错误:(在CMakeLists.txt 中添加一行 )

list (REMOVE_ITEM PCL_LIBRARIES "vtkproj4")

至此,这个问题得到解决

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章