Navigation

    蓝鲸ROS机器人论坛

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Popular
    ROS交流群
    ROS Group
    产品服务
    Product Service
    开源代码库
    Github
    官网
    Official website
    技术交流
    Technological exchanges
    激光雷达
    LIDAR
    ROS教程
    ROS Tourials
    深度学习
    Deep Learning
    机器视觉
    Computer Vision

    编译安装libfreenect2时错误问题

    技术交流
    1
    1
    3946
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • weijiz
      weijiz last edited by

      在编译安装libfreenect2时出现如下的错误

      -- using tinythread as threading library
      -- Checking for module 'libusb-1.0>=1.0.20'
      --   
      CMake Error at /usr/share/cmake-3.5/Modules/FindPkgConfig.cmake:367 (message):
        A required package was not found
      Call Stack (most recent call first):
        /usr/share/cmake-3.5/Modules/FindPkgConfig.cmake:532 (_pkg_check_modules_internal)
        cmake_modules/FindLibUSB.cmake:21 (PKG_CHECK_MODULES)
        CMakeLists.txt:93 (FIND_PACKAGE)
      

      这个错误来自于libusb,但是我已经按照说明安装了libusb,即执行下面的指令

      sudo apt-get install libusb-1.0-0-dev
      

      然后我又重新源码安装了最新的libusb,发现还是不行.
      最后就把libfreenect2/cmake_modules/FindLibUSB.cmake中的几行注释掉,感觉是在用pkg-config来找库的时候module的名字错了

      # - Find libusb for portable USB support
      # 
      # If the LibUSB_ROOT environment variable
      # is defined, it will be used as base path.
      # The following standard variables get defined:
      #  LibUSB_FOUND:    true if LibUSB was found
      #  LibUSB_INCLUDE_DIR: the directory that contains the include file
      #  LibUSB_LIBRARIES:  the libraries
      
      IF(PKG_CONFIG_FOUND)
        IF(DEPENDS_DIR) #Otherwise use System pkg-config path
          SET(ENV{PKG_CONFIG_PATH} "$ENV{PKG_CONFIG_PATH}:${DEPENDS_DIR}/libusb/lib/pkgconfig")
        ENDIF()
        SET(MODULE "libusb-1.0")
        #把下面的几行注释掉  
        #IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
        #  SET(MODULE "libusb-1.0>=1.0.20")
        #ENDIF()
        IF(LibUSB_FIND_REQUIRED)
          SET(LibUSB_REQUIRED "REQUIRED")
        ENDIF()
      

      这样在安装说明文件的方法make就可以了

      1 Reply Last reply Reply Quote 0
      • 1 / 1
      • First post
        Last post
      Copyright © 2015-2023 BlueWhale community