在 Termux 中执行“make”命令时出错?

Error while executing "make" command in Termux?

提问人:Apoliticalboy 提问时间:11/3/2023 最后编辑:John BollingerApoliticalboy 更新时间:11/3/2023 访问量:39

问:

gcc -Iinclude -W -g3 src/bluesnarfer.c -lbluetooth -o bluesnarfer
src/bluesnarfer.c:34:10: fatal error: 'bluetooth/bluetooth.h' file not found
#include <bluetooth/bluetooth.h>
         ^~~~~~~
1 error generated.
make: *** [Makefile:11: bluesnarfer] Error 1

这是在Termux上的root三星手机上执行的。

尝试过同样的错误。sudo make

错误处理 makefile termux

评论

0赞 tripleee 11/3/2023
sudo不能让文件突然存在,而它以前并不存在。阅读错误消息。
0赞 tripleee 11/3/2023
这回答了你的问题吗?蓝牙/蓝牙.h 在 Linux 中的什么位置?
0赞 Apoliticalboy 11/3/2023
不,因为我无法安装非库。
2赞 John Bollinger 11/3/2023
如果无法安装库,则只有两种主要可能性:(1)库及其标头存在,但不在默认搜索路径中;或 (2) 标头至少不可用。在案例 (2) 中,您不走运,无法在该环境中构建软件。在情况 (1) 中,您需要找到标头,以便向构建命令添加适当的标志。-I

答: 暂无答案