JGbooks 2019-10-17 11:55 采纳率: 0%
浏览 418
已结题

centos6 编译osquery出错

问题描述

目的:需要在centos6.10 上安装osquery

环境:centos6.10

内核: 2.6.32-431.el6.x86_64

步骤:

参考官网ubuntu18.04 编译步骤

https://osquery.readthedocs.io/en/stable/development/building/

# Build osquery
1.mkdir build; cd build
2.cmake -DOSQUERY_TOOLCHAIN_SYSROOT=/usr/local/osquery-toolchain ..
3.cmake --build . -j10 # where 10 is the number of parallel build jobs

在第2步发生如下错误:

CMake Error at /usr/local/share/cmake-3.14/Modules/CMakeTestCCompiler.cmake:60 (message):
  The C compiler
"/usr/local/osquery-toolchain/usr/bin/clang"

is not able to compile a simple test program.

It fails with the following output:

Change Dir: /mnt/hgfs/share/osquery/source/osquery/build/CMakeFiles/CMakeTmp

Run Build Command(s):/usr/bin/gmake cmTC_cc220/fast 
/usr/bin/gmake -f CMakeFiles/cmTC_cc220.dir/build.make CMakeFiles/cmTC_cc220.dir/build
gmake[1]: Entering directory `/mnt/hgfs/share/osquery/source/osquery/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_cc220.dir/testCCompiler.c.o
/usr/local/osquery-toolchain/usr/bin/clang --sysroot=/usr/local/osquery-toolchain    -o CMakeFiles/cmTC_cc220.dir/testCCompiler.c.o   -c /mnt/hgfs/share/osquery/source/osquery/build/CMakeFiles/CMakeTmp/testCCompiler.c
Linking C executable cmTC_cc220
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_cc220.dir/link.txt --verbose=1
/usr/local/osquery-toolchain/usr/bin/clang --sysroot=/usr/local/osquery-toolchain      CMakeFiles/cmTC_cc220.dir/testCCompiler.c.o  -o cmTC_cc220 
ld.lld: error: cannot open output file cmTC_cc220: Input/output error
clang-8: error: linker command failed with exit code 1 (use -v to see invocation)
gmake[1]: *** [cmTC_cc220] Error 1
gmake[1]: Leaving directory `/mnt/hgfs/share/osquery/source/osquery/build/CMakeFiles/CMakeTmp'
gmake: *** [cmTC_cc220/fast] Error 2

对cmake 不是很熟悉,不知以上问题发错误该定位于哪里?
  • 写回答

1条回答 默认 最新

  • zqbnqsdsmd 2019-10-17 13:05
    关注
    评论

报告相同问题?

悬赏问题

  • ¥15 请教:如何用postman调用本地虚拟机区块链接上的合约?
  • ¥15 为什么使用javacv转封装rtsp为rtmp时出现如下问题:[h264 @ 000000004faf7500]no frame?
  • ¥15 乘性高斯噪声在深度学习网络中的应用
  • ¥15 运筹学排序问题中的在线排序
  • ¥15 关于docker部署flink集成hadoop的yarn,请教个问题 flink启动yarn-session.sh连不上hadoop,这个整了好几天一直不行,求帮忙看一下怎么解决
  • ¥15 深度学习根据CNN网络模型,搭建BP模型并训练MNIST数据集
  • ¥15 C++ 头文件/宏冲突问题解决
  • ¥15 用comsol模拟大气湍流通过底部加热(温度不同)的腔体
  • ¥50 安卓adb backup备份子用户应用数据失败
  • ¥20 有人能用聚类分析帮我分析一下文本内容嘛