在 ubuntu 15.04 上安装 libfreenect2 的问题

在 ubuntu 15.04 上安装 libfreenect2 的问题

我正在尝试安装 libfreenect2。

我已经克隆了存储库。

我已经成功制作了 cmake。

但是当我make该文件时,出现以下错误:

[  3%] Building CXX object CMakeFiles/generate_resources_tool.dir/src/generate_resources.cpp.o
In file included from /usr/include/stdlib.h:314:0,
                 from /usr/include/c++/4.9/cstdlib:72,
                 from /usr/include/c++/4.9/ext/string_conversions.h:41,
                 from /usr/include/c++/4.9/bits/basic_string.h:2850,
                 from /usr/include/c++/4.9/string:52,
                 from /usr/include/c++/4.9/bits/locale_classes.h:40,
                 from /usr/include/c++/4.9/bits/ios_base.h:41,
                 from /usr/include/c++/4.9/ios:42,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from /home/satellite/libfreenect2/examples/protonect/src/generate_resources.cpp:27:
/usr/include/x86_64-linux-gnu/sys/types.h:222:28: fatal error: sys/sysmacros.h: No such file or directory
 # include <sys/sysmacros.h>
                            ^
compilation terminated.
CMakeFiles/generate_resources_tool.dir/build.make:54: recipe for target 'CMakeFiles/generate_resources_tool.dir/src/generate_resources.cpp.o' failed
make[2]: *** [CMakeFiles/generate_resources_tool.dir/src/generate_resources.cpp.o] Error 1
CMakeFiles/Makefile2:200: recipe for target 'CMakeFiles/generate_resources_tool.dir/all' failed
make[1]: *** [CMakeFiles/generate_resources_tool.dir/all] Error 2
Makefile:117: recipe for target 'all' failed
make: *** [all] Error 2

真是烦人。我不知道问题出在哪里。

我该如何修复此问题?

答案1

缺少的头文件属于多个软件包。请先检查这一点(您使用的是 64 位系统)

sudo apt-get install libc6-dev-amd64

或适用于 32 位(适用于使用 32 位系统的后续阅读器)

sudo apt-get install libc6-dev-i386

查看包含此头文件的软件包这里

相关内容