安装libusb-1和libudev,以使Openni在Fedora上编译



我刚刚更改为Fedora 20,我正试图习惯它并学习它。在我只与Ubuntu合作之前,我有一些新事物。

我试图通过从git下载软件包来编译OpenNi_master。第一步是输入

   /OpenNi_Master/Platform/Linux/CreateDist/  

ans运行 sudo ./redistmaker。

当我这样做时,我会得到以下内容:

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

所以我尝试运行

  sudo yum install libgusb.x86_64.

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

任何帮助都将受到赞赏!

/erik

在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

我也有类似的问题,但是存在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

最新更新