Make:ターゲット「pcap-bt-monitor-linux.o」のレシピが失敗しました。

Make:ターゲット「pcap-bt-monitor-linux.o」のレシピが失敗しました。

私はこれをフォローしていますガイド私のDebian Linuxにsnortをインストールします。手順2でlibpcapを構築するために "Make"コマンドを実行している間、 "Recipe for target 'pcap-bt-monitor-linux.o' failed"エラーが発生します。

gcc -fpic -I.  -DHAVE_CONFIG_H  -D_U_="__attribute__((unused))" -g -O2 -c ./pcap-bt-monitor-linux.c
./pcap-bt-monitor-linux.c:42:28: fatal error: bluetooth/mgmt.h: No such file or directory
#include <bluetooth/mgmt.h>
                        ^
compilation terminated.
Makefile:83: recipe for target 'pcap-bt-monitor-linux.o' failed
make: *** [pcap-bt-monitor-linux.o] Error 1

ベストアンサー1



他の人が述べたように、問題は、欠落している依存関係bluetooth / mgmt.hが見つからないことです。

上記の問題を解決するより直接的な方法は、不足しているヘッダーをコピーするカスタムインクルードディレクトリを作成することです。

# ${source_dir} is the dir where you're using make
# creating custom include directory
mkdir -p ${source_dir}/include/bluetooth

# downloading the missing header into it
curl https://projects.archlinux.org/svntogit/packages.git/plain/trunk/mgmt.h?h=packages/libpcap -o ${source_dir}/include/bluetooth/mgmt.h

# Adding the custom include directory to the include path
export CFLAGS="$CFLAGS -I${source_dir}/include"

動作していることを確認してください

おすすめ記事