树莓派 linux安装PyBlueZ报错:fatal error: bluetooth/bluetooth.h: No such file or directory

在尝试基于BlueZ构建C文件时,博主遇到问题:系统中缺少bluetooth.h头文件。尽管蓝牙适配器工作正常且已成功编译BlueZ,但仍然报错。解决方案是在/usr/include/bluetooth目录下找到了该头文件,并建议通过pip安装相关库来解决。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

在这里插入图片描述

I want to build a c file based on BlueZ but seems no bluetooth.h file in my system.

fatal error: bluetooth/bluetooth.h: No such file or directory

I am sure the bluetooth dongle is running correctly and I have built Bluez successfully.

Update

For my case, I find the bluetooth.h in /user/include/bluetooth folder

解决方案,先安装这个库,在pip

sudo 
apt-get install libbluetooth-dev

在这里插入图片描述

D:\edk2\EmulatorPkg\Application\BootCountDriver\BootCountDxe.c(5): fatal error C1083: ޷򿪰ļ: BootCountVariable.h: No such file or directory AutoGen.c ע: ļ: D:\edk2\Build\EmulatorX64\DEBUG_VS2019\X64\EmulatorPkg\Application\BootCountDriver\BootCountDxe\DEBUG\AutoGen.h ע: ļ: D:\edk2\MdePkg\Include\Uefi.h ע: ļ: D:\edk2\MdePkg\Include\Uefi/UefiBaseType.h ע: ļ: D:\edk2\MdePkg\Include\Base.h ע: ļ: D:\edk2\MdePkg\Include\X64\ProcessorBind.h ע: ļ: D:\edk2\MdePkg\Include\Uefi/UefiSpec.h ע: ļ: D:\edk2\MdePkg\Include\Uefi/UefiMultiPhase.h ע: ļ: D:\edk2\MdePkg\Include\Guid/WinCertificate.h ע: ļ: D:\edk2\MdePkg\Include\Protocol/DevicePath.h ע: ļ: D:\edk2\MdePkg\Include\Guid/PcAnsi.h ע: ļ: D:\edk2\MdePkg\Include\IndustryStandard/Bluetooth.h ע: ļ: D:\edk2\MdePkg\Include\IndustryStandard/Acpi60.h ע: ļ: D:\edk2\MdePkg\Include\IndustryStandard/Acpi51.h ע: ļ: D:\edk2\MdePkg\Include\IndustryStandard/Acpi50.h ע: ļ: D:\edk2\MdePkg\Include\IndustryStandard/Acpi40.h ע: ļ: D:\edk2\MdePkg\Include\IndustryStandard/Acpi30.h ע: ļ: D:\edk2\MdePkg\Include\IndustryStandard/Acpi20.h ע: ļ: D:\edk2\MdePkg\Include\IndustryStandard/Acpi10.h ע: ļ: D:\edk2\MdePkg\Include\IndustryStandard/AcpiAml.h ע: ļ: D:\edk2\MdePkg\Include\Protocol/SimpleTextIn.h ע: ļ: D:\edk2\MdePkg\Include\Protocol/SimpleTextInEx.h ע: ļ: D:\edk2\MdePkg\Include\Protocol/SimpleTextOut.h ע: ļ: D:\edk2\MdePkg\Include\Uefi/UefiPxe.h ע: ļ: D:\edk2\MdePkg\Include\Uefi/UefiGpt.h ע: ļ: D:\edk2\MdePkg\Include\Uefi/UefiInternalFormRepresentation.h ע: ļ: D:\edk2\MdePkg\Include\Guid/HiiFormMapMethodGuid.h ע: ļ: D:\edk2\MdePkg\Include\Library/BaseLib.h ע: ļ: D:\edk2\MdePkg\Include\Library/DebugLib.h ע: ļ: D:\edk2\MdePkg\Include\Library/UefiBootServicesTableLib.h ע: ļ: D:\edk2\MdePkg\Include\Library/UefiDriverEntryPoint.h NMAKE : fatal error U1077: D:\Compiler\VS2019\VC\Tools\MSVC\14.29.30133\bin\Hostx86\x64\cl.exe: ش롰0x2 Stop. build.py... : error 7000: Failed to execute command D:\Compiler\VS2019\VC\Tools\MSVC\14.29.30133\bin\Hostx86\x86\nmake.exe /nologo tbuild [D:\edk2\Build\EmulatorX64\DEBUG_VS2019\X64\EmulatorPkg\Application\BootCountDriver\BootCountDxe] build.py... : error F002: Failed to build module D:\edk2\EmulatorPkg\Application\BootCountDriver\BootCountDxe.inf [X64, VS2019, DEBUG]
最新发布
03-27
D:\edk2\Build\MdeModule\DEBUG_VS2019\X64\MdeModulePkg\Application\BootCountDriver\BootCountDriver\DEBUG\AutoGen.h(16): fatal error C1083: ޷򿪰ļ: PiDxe.h: No such file or directory ע: ļ: D:\edk2\MdePkg\Include\Library/PeiServicesLib.h ע: ļ: D:\edk2\MdePkg\Include\Library/UefiDriverEntryPoint.h ע: ļ: D:\edk2\MdePkg\Include\Uefi/UefiBaseType.h ע: ļ: D:\edk2\MdePkg\Include\Protocol/GraphicsOutput.h ע: ļ: D:\edk2\MdePkg\Include\Protocol/DriverConfiguration.h ע: ļ: D:\edk2\MdePkg\Include\Pi/PiS3BootScript.h ע: ļ: D:\edk2\MdePkg\Include\Protocol/DriverDiagnostics2.h ע: ļ: D:\edk2\MdePkg\Include\Protocol/SimpleTextOut.h ע: ļ: D:\edk2\MdeModulePkg\Include\Ppi/UsbHostController.h ע: ļ: D:\edk2\MdePkg\Include\Library/DebugLib.h ע: ļ: D:\edk2\MdePkg\Include\Library/CacheMaintenanceLib.h ע: ļ: D:\edk2\MdePkg\Include\Library/MemoryAllocationLib.h ע: ļ: D:\edk2\MdePkg\Include\Uefi/UefiGpt.h ע: ļ: D:\edk2\MdePkg\Include\Protocol/GraphicsOutput.h ע: ļ: D:\edk2\MdePkg\Include\Library/DebugLib.h ע: ļ: D:\edk2\MdePkg\Include\Guid/PcAnsi.h ע: ļ: D:\edk2\MdePkg\Include\Guid/DebugImageInfoTable.h NMAKE : fatal error U1077: D:\Compiler\VS2019\VC\Tools\MSVC\14.29.30133\bin\Hostx86\x64\cl.exe: ش롰0x2 ע: ļ: D:\edk2\MdePkg\Include\Library/BaseMemoryLib.h ע: ļ: D:\edk2\MdePkg\Include\Library/UefiLib.h ע: ļ: D:\edk2\MdePkg\Include\Base.h ע: ļ: D:\edk2\MdePkg\Include\Protocol/SimpleFileSystem.h ע: ļ: D:\edk2\MdePkg\Include\Protocol/DriverConfiguration2.h ע: ļ: D:\edk2\MdePkg\Include\Ppi/CpuIo.h ע: ļ: D:\edk2\MdePkg\Include\Protocol/GraphicsOutput.h ע: ļ: D:\edk2\MdePkg\Include\Uefi/UefiPxe.h ע: ļ: D:\edk2\MdePkg\Include\Ppi/BlockIo.h ע: ļ: D:\edk2\MdePkg\Include\Library/PeimEntryPoint.h ע: ļ: D:\edk2\MdePkg\Include\Library/PeiServicesTablePointerLib.h ע: ļ: D:\edk2\MdeModulePkg\Include\Library/AuthVariableLib.h ע: ļ: D:\edk2\MdePkg\Include\Uefi/UefiInternalFormRepresentation.h ע: ļ: D:\edk2\MdePkg\Include\Protocol/SimpleFileSystem.h ע: ļ: D:\edk2\MdePkg\Include\Library/DevicePathLib.h ע: ļ: D:\edk2\MdePkg\Include\IndustryStandard/Bluetooth.h ע: ļ: D:\edk2\MdePkg\Include\Guid/FileInfo.h Stop. ע: ļ: D:\edk2\MdePkg\Include\Library/TimerLib.h build.py... : error 7000: Failed to execute command D:\Compiler\VS2019\VC\Tools\MSVC\14.29.30133\bin\Hostx86\x86\nmake.exe /nologo tbuild [D:\edk2\Build\MdeModule\DEBUG_VS2019\X64\MdeModulePkg\Application\BootCountDriver\BootCountDriver] ע: ļ: D:\edk2\MdePkg\Include\IndustryStandard/Acpi.h ע: ļ: D:\edk2\MdePkg\Include\X64\ProcessorBind.h ע: ļ: D:\edk2\MdePkg\Include\Library/DevicePathLib.h ע: ļ: D:\edk2\MdePkg\Include\Protocol/ComponentName.h ע: ļ: D:\edk2\MdePkg\Include\Ppi/PciCfg2.h ע: ļ: D:\edk2\MdePkg\Include\Protocol/SimpleFileSystem.h ע: ļ: D:\edk2\MdePkg\Include\Uefi/UefiGpt.h ע: ļ: D:\edk2\MdePkg\Include\Ppi/BlockIo2.h ע: ļ: D:\edk2\MdePkg\Include\Library/BaseMemoryLib.h ע: ļ: D:\edk2\MdePkg\Include\Library/MemoryAllocationLib.h ע: ļ: D:\edk2\MdeModulePkg\Include\Library/VarCheckLib.h ע: ļ: D:\edk2\MdePkg\Include\Guid/HiiFormMapMethodGuid.h ע: ļ: D:\edk2\MdePkg\Include\Library/BaseLib.h ע: ļ: D:\edk2\MdePkg\Include\Library/MemoryAllocationLib.h ע: ļ: D:\edk2\MdePkg\Include\IndustryStandard/Acpi60.h ע: ļ: D:\edk2\MdePkg\Include\Guid/Apriori.h ע: ļ: D:\edk2\MdePkg\Include\Library/IoLib.h build.py... : error F002: Failed to build module D:\edk2\MdeModulePkg\Application\BootCountDriver\BootCountDriver.inf [X64, VS2019, DEBUG]
03-26
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

南七小僧

打赏后,可以添加微信一对一咨询

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值