解决BUG记录:安装PCL1.8.1的时候Qt5WebKitWid报错Qt5WebKitWidgets_FOUND to FALSE so package “Qt5WebKitWidgets“....

目录

1 问题描述

2 解决方案


1 问题描述

        在编译pcl1.8.1时,我先前装过ROS,ROS自带了VTK6.X因此我没装VTK别的版本,在配置cmake的时候发生报错:解决BUG记录:安装PCL1.8.1的时候Qt5WebKitWid报错Qt5WebKitWidgets_FOUND to FALSE so package “Qt5WebKitWidgets“...._第1张图片

CMake Error at /usr/lib/cmake/vtk-6.3/Modules/vtkGUISupportQtWebkit.cmake:14 (find_package):
  Found package configuration file:

    /usr/lib/x86_64-linux-gnu/cmake/Qt5WebKitWidgets/Qt5WebKitWidgetsConfig.cmake

  but it set Qt5WebKitWidgets_FOUND to FALSE so package "Qt5WebKitWidgets" is
  considered to be NOT FOUND.  Reason given by package:

  The following imported targets are referenced, but are missing: Qt5::WebKit

Call Stack (most recent call first):
  /usr/lib/cmake/vtk-6.3/vtkModuleAPI.cmake:45 (include)
  /usr/lib/cmake/vtk-6.3/vtkModuleAPI.cmake:15 (vtk_module_load)
  /usr/lib/cmake/vtk-6.3/vtkModuleAPI.cmake:132 (_vtk_module_config_recurse)
  /usr/lib/cmake/vtk-6.3/VTKConfig.cmake:80 (vtk_module_config)
  CMakeLists.txt:363 (find_package)


-- Configuring incomplete, errors occurred!
See also "/bag/pcl-pcl-1.8.1/build/CMakeFiles/CMakeOutput.log".
See also "/bag/pcl-pcl-1.8.1/build/CMakeFiles/CMakeError.log".

2 解决方案

        直接再电脑上搜索Qt5WebKitWidgets,打开其项目位置:

liuhongwei@liuhongwei-Legion-Y9000P-IRX8H:/bag/pcl-pcl-1.8.1/build$ sudo updatedb
liuhongwei@liuhongwei-Legion-Y9000P-IRX8H:/bag/pcl-pcl-1.8.1/build$ locate Qt5WebKitWidgets
/home/liuhongwei/anaconda3/lib/libQt5WebKitWidgets.so
/home/liuhongwei/anaconda3/lib/libQt5WebKitWidgets.so.5
/home/liuhongwei/anaconda3/lib/libQt5WebKitWidgets.so.5.212.0
/home/liuhongwei/anaconda3/lib/cmake/Qt5WebKitWidgets
/home/liuhongwei/anaconda3/lib/cmake/Qt5WebKitWidgets/Qt5WebKitWidgetsConfig.cmake
/home/liuhongwei/anaconda3/lib/cmake/Qt5WebKitWidgets/Qt5WebKitWidgetsConfigVersion.cmake
/home/liuhongwei/anaconda3/lib/cmake/Qt5WebKitWidgets/Qt5WebKitWidgetsTargets-release.cmake
/home/liuhongwei/anaconda3/lib/cmake/Qt5WebKitWidgets/Qt5WebKitWidgetsTargets.cmake
/home/liuhongwei/anaconda3/lib/pkgconfig/Qt5WebKitWidgets.pc
/home/liuhongwei/anaconda3/pkgs/qtwebkit-5.212-h4eab89a_4/lib/libQt5WebKitWidgets.so
/home/liuhongwei/anaconda3/pkgs/qtwebkit-5.212-h4eab89a_4/lib/libQt5WebKitWidgets.so.5
/home/liuhongwei/anaconda3/pkgs/qtwebkit-5.212-h4eab89a_4/lib/libQt5WebKitWidgets.so.5.212.0
/home/liuhongwei/anaconda3/pkgs/qtwebkit-5.212-h4eab89a_4/lib/cmake/Qt5WebKitWidgets
/home/liuhongwei/anaconda3/pkgs/qtwebkit-5.212-h4eab89a_4/lib/cmake/Qt5WebKitWidgets/Qt5WebKitWidgetsConfig.cmake
/home/liuhongwei/anaconda3/pkgs/qtwebkit-5.212-h4eab89a_4/lib/cmake/Qt5WebKitWidgets/Qt5WebKitWidgetsConfigVersion.cmake
/home/liuhongwei/anaconda3/pkgs/qtwebkit-5.212-h4eab89a_4/lib/cmake/Qt5WebKitWidgets/Qt5WebKitWidgetsTargets-release.cmake
/home/liuhongwei/anaconda3/pkgs/qtwebkit-5.212-h4eab89a_4/lib/cmake/Qt5WebKitWidgets/Qt5WebKitWidgetsTargets.cmake
/home/liuhongwei/anaconda3/pkgs/qtwebkit-5.212-h4eab89a_4/lib/pkgconfig/Qt5WebKitWidgets.pc
/usr/lib/x86_64-linux-gnu/libQt5WebKitWidgets.so
/usr/lib/x86_64-linux-gnu/libQt5WebKitWidgets.so.5
/usr/lib/x86_64-linux-gnu/libQt5WebKitWidgets.so.5.212.0
/usr/lib/x86_64-linux-gnu/cmake/Qt5WebKitWidgets
/usr/lib/x86_64-linux-gnu/cmake/Qt5WebKitWidgets/Qt5WebKitWidgetsConfig.cmake
/usr/lib/x86_64-linux-gnu/cmake/Qt5WebKitWidgets/Qt5WebKitWidgetsConfigVersion.cmake
/usr/lib/x86_64-linux-gnu/cmake/Qt5WebKitWidgets/Qt5WebKitWidgetsTargets-none.cmake
/usr/lib/x86_64-linux-gnu/cmake/Qt5WebKitWidgets/Qt5WebKitWidgetsTargets.cmake
/usr/lib/x86_64-linux-gnu/pkgconfig/Qt5WebKitWidgets.pc

        不是conda环境下的哦,别搞错了。解决BUG记录:安装PCL1.8.1的时候Qt5WebKitWid报错Qt5WebKitWidgets_FOUND to FALSE so package “Qt5WebKitWidgets“...._第2张图片

        就是这些。

        打开错误位置的cmake文件,我这里是/usr/lib/x86_64-linux-gnu/cmake/Qt5WebKitWidgets/Qt5WebKitWidgetsConfig.cmake

        解决BUG记录:安装PCL1.8.1的时候Qt5WebKitWid报错Qt5WebKitWidgets_FOUND to FALSE so package “Qt5WebKitWidgets“...._第3张图片

        改称绝对路径。

解决BUG记录:安装PCL1.8.1的时候Qt5WebKitWid报错Qt5WebKitWidgets_FOUND to FALSE so package “Qt5WebKitWidgets“...._第4张图片

        接着报错!解决BUG记录:安装PCL1.8.1的时候Qt5WebKitWid报错Qt5WebKitWidgets_FOUND to FALSE so package “Qt5WebKitWidgets“...._第5张图片

        那接着改咯~

        好啦!

        其实我们在上面输入这么一行代码也可以~

set(CMAKE_CURRENT_LIST_DIR "/usr/lib/x86_64-linux-gnu/cmake/Qt5WebKitWidgets")
get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../../" ABSOLUTE)

# Use original install prefix when loaded through a "/usr move"
# cross-prefix symbolic link such as /lib -> /usr/lib.
get_filename_component(_realCurr "${CMAKE_CURRENT_LIST_DIR}" REALPATH)
get_filename_component(_realOrig "/usr/lib/x86_64-linux-gnu/cmake/Qt5WebKitWidgets" REALPATH)

        set(CMAKE_CURRENT_LIST_DIR "/usr/lib/x86_64-linux-gnu/cmake/Qt5WebKitWidgets")

        开始编译pcl

解决BUG记录:安装PCL1.8.1的时候Qt5WebKitWid报错Qt5WebKitWidgets_FOUND to FALSE so package “Qt5WebKitWidgets“...._第6张图片

你可能感兴趣的:(bug,qt,开发语言)