服务上安装 Google honggfuzz 遇到错误提示:No such file or directory,该错误可能有两种不同的情况,分别为:bfd.h: No such file or directorylibunwind-ptrace.h: No such file or directory。解决方法如下:

安装代码

$ git https://github.com/google/honggfuzz.git
$ cd honggfuzz
$ make
$ make install

错误解决

错误代码一:bfd.h: No such file or directory

linux/bfd.c:28:10: fatal error: bfd.h: No such file or directory
   28 | #include <bfd.h>
      |          ^~~~~~~
compilation terminated.
make: *** [Makefile:263: linux/bfd.o] Error 1

解决方法:

$ sduo apt-get install binutils-dev

错误代码二:libunwind-ptrace.h: No such file or directory

linux/unwind.c:27:10: fatal error: libunwind-ptrace.h: No such file or directory
   27 | #include <libunwind-ptrace.h>
      |          ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [Makefile:263: linux/unwind.o] Error 1

解决方法:

$ sudo apt-get install libunwind-dev