【问题标题】:Installing libusb-1 and libudev to get openni to compile on Fedora安装 libusb-1 和 libudev 让 openni 在 Fedora 上编译
【发布时间】:2014-03-04 13:36:54
【问题描述】:

我刚刚更换到 Fedora 20,我正在努力适应并学习它。之前我只使用过 ubuntu,所以对我来说有一些新东西。

我尝试通过从 git 下载包来编译 openni_master。第一步是进入

   /OpenNi_Master/Platform/Linux/CreateDist/  

ans 运行 须藤 ./RedistMaker 。

当我这样做时,我会得到以下信息:

  fatal error: libusb-1.0/libusb.h: No such file or directory.

所以我尝试运行

  sudo yum install libgusb.x86_64.

运行 locate libgusb 会得到 .so 文件

  /usr/lib64/libgusb.so.2
  /usr/lib64/libgusb.so.2.0.3

但没有 libusb-1.0.h。

所以我尝试从网上下载软件包 libusb-1.0.18 并在我的计算机上编译它。 但是在文件夹中运行 ./configure 会给出

  checking for libudev.h... no
  configure: error: "udev support requested but libudev not installed"

所以我安装了

  libgudev1-devel.x86_64

  libgudev1.x86_64.

可能我安装了错误的软件包,但我是 Fedora 的新手,我真的不知道在哪里搜索它们。

感谢任何帮助!

/埃里克

【问题讨论】:

    标签: fedora openni libusb-1.0


    【解决方案1】:

    我遇到了类似的问题,但 libusb.h 存在。

    # CFLAGS="-O2 -Wall -march=native " ./configure --enable-scrypt --enable-Avalon
    ...
    checking libudev.h usability... no
    checking libudev.h presence... no
    checking for libudev.h... no
    configure: error: "udev support requested but libudev not installed"
    configure: error: ./configure failed for compat/libusb-1.0
    

    已通过安装更新​​的 libudev 修复:

    # yum provides */libudev.h
    Loaded plugins: fastestmirror, refresh-packagekit, security
    Loading mirror speeds from cached hostfile
     * base: mirrors.clouvider.net
     * epel: ftp-stud.hs-esslingen.de
     * extras: centos.mirroring.pulsant.co.uk
     * rpmforge: fr2.rpmfind.net
     * updates: mozart.ee.ic.ac.uk
    libudev-devel-147-2.73.el6_8.2.x86_64 : Development files for libudev
    Repo        : base
    Matched from:
    Filename    : /usr/include/libudev.h
    
    # yum install libudev-devel-147-2.73.el6_8.2.x86_64
    Loaded plugins: fastestmirror, refresh-packagekit, security
    Loading mirror speeds from cached hostfile
     * base: mirrors.clouvider.net
     * epel: ftp-stud.hs-esslingen.de
     * extras: centos.mirroring.pulsant.co.uk
     * rpmforge: fr2.rpmfind.net
     * updates: mozart.ee.ic.ac.uk
    Setting up Install Process
    Resolving Dependencies
    --> Running transaction check
    ---> Package libudev-devel.x86_64 0:147-2.73.el6_8.2 will be installed
    --> Processing Dependency: udev = 147-2.73.el6_8.2 for package: libudev-devel-147-2.73.el6_8.2.x86_64
    --> Running transaction check
    ---> Package udev.x86_64 0:147-2.46.el6 will be updated
    ---> Package udev.x86_64 0:147-2.73.el6_8.2 will be an update
    --> Finished Dependency Resolution
    
    # CFLAGS="-O2 -Wall -march=native " ./configure --enable-scrypt --enable-Avalon
    ...
    checking libudev.h usability... yes
    checking libudev.h presence... yes
    checking for libudev.h... yes
    checking for udev_new in -ludev... yes
    

    【讨论】:

      【解决方案2】:

      在 Fedora(和其他使用 yum 进行包管理的发行版)中,您可以找出哪个包提供了某个文件,如下所示:

      $ yum provides /path/to/my/file
      

      如果您只知道文件名的一部分,则可以使用通配符:

      $ yum provides */myfile
      

      那么,libusb.h 提供了什么?

      $ yum provides */libusb.h
      [...]
      libusbx-devel-1.0.17-1.fc21.x86_64 : Development files for libusbx
      Repo        : rawhide
      Matched from:
      Filename    : /usr/include/libusb-1.0/libusb.h
      [...]
      

      所以你需要安装libusbx-devel

      【讨论】:

      • 感谢您的指导,很有帮助! /埃里克
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-02-03
      • 2018-03-20
      • 2016-01-30
      相关资源
      最近更新 更多