gpt4 book ai didi

python - 在 Linux 中安装 Pybluez

转载 作者:IT老高 更新时间:2023-10-28 20:50:08 25 4
gpt4 key购买 nike

我正在尝试在我的 Linux Mint 15 机器上安装 PyBluez-0.18,但在安装过程中收到一条错误消息。我尝试在网上搜索,看看其他人是否遇到过这个问题,但我找不到。

我列出了我尝试执行的命令以及收到的错误消息。有人可以告诉我我做错了什么,我需要做些什么来解决

tri108354@prtgc004-Latitude-E6320 ~/Downloads/PyBluez-0.18 $ python setup.py install
running install
running build
running build_py
running build_ext
building 'bluetooth._bluetooth' extension
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/home/tri108354/anaconda/include/python2.7 -c bluez/btmodule.c -o build/temp.linux-i686-2.7/bluez/btmodule.o
In file included from bluez/btmodule.c:20:0:
bluez/btmodule.h:5:33: fatal error: bluetooth/bluetooth.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1

最佳答案

你需要安装 libbluetooth-dev 包来编译你的代码

sudo apt-get install libbluetooth-dev

那应该安装蓝牙头文件。

关于python - 在 Linux 中安装 Pybluez,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21597536/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com