8

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

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

   /OpenNi_Master/Platform/Linux/CreateDist/  

运行 sudo ./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 的新手,我真的不知道在哪里搜索它们。

任何帮助表示赞赏!

/埃里克

4

2 回答 2

14

在 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.

于 2014-02-07T10:19:01.703 回答
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
于 2017-04-25T12:32:09.537 回答