Closed Werner-G closed 1 year ago
Hey! Seems like this is an issue with bluepy. Maybe linked to the latest raspbian or the 64bit version.
Does sudo pip3 install bluepy
succeed?
cool, superschnell...
No, even this doesn't work. As an extract:
pi@MyHome:~ $ sudo pip3 install bluepy Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Collecting bluepy Using cached bluepy-1.3.0.tar.gz (217 kB) Building wheels for collected packages: bluepy Building wheel for bluepy (setup.py) ... error
and
Running setup.py clean for bluepy Failed to build bluepy Installing collected packages: bluepy Running setup.py install for bluepy ... error
npm v6.14.16 node 14.19.1
Do you need a complete log?
I had the same error, with a bit more detail:
b"make: Entering directory '/tmp/pip-install-awh6wojw/bluepy/bluepy'\ntar xzf bluez-src.tgz\ntouch ./bluez-5.47/lib/bluetooth.c ./bluez-5.47/lib/hci.c ./bluez-5.47/lib/sdp.c ./bluez-5.47/lib/uuid.c ./bluez-5.47/attrib/att.c ./bluez-5.47/attrib/gatt.c ./bluez-5.47/attrib/gattrib.c ./bluez-5.47/attrib/utils.c ./bluez-5.47/btio/btio.c ./bluez-5.47/src/log.c ./bluez-5.47/src/shared/mgmt.c ./bluez-5.47/src/shared/crypto.c ./bluez-5.47/src/shared/att.c ./bluez-5.47/src/shared/queue.c ./bluez-5.47/src/shared/util.c ./bluez-5.47/src/shared/io-glib.c ./bluez-5.47/src/shared/timeout-glib.c\nPackage glib-2.0 was not found in the pkg-config search path.\nPerhaps you should add the directory containing
glib-2.0.pc'\nto the PKG_CONFIG_PATH environment variable\nNo package 'glib-2.0' found\nPackage glib-2.0 was not found in the pkg-config search path.\nPerhaps you should add the directory containing
glib-2.0.pc'\nto the PKG_CONFIG_PATH environment variable\nNo package 'glib-2.0' found\ncc -L. -g -Wall -Os -DHAVE_CONFIG_H -I./bluez-5.47/attrib -I./bluez-5.47 -I./bluez-5.47/lib -I./bluez-5.47/src -I./bluez-5.47/gdbus -I./bluez-5.47/btio -I./bluez-5.47/sys -o bluepy-helper bluepy-helper.c ./bluez-5.47/lib/bluetooth.c ./bluez-5.47/lib/hci.c ./bluez-5.47/lib/sdp.c ./bluez-5.47/lib/uuid.c ./bluez-5.47/attrib/att.c ./bluez-5.47/attrib/gatt.c ./bluez-5.47/attrib/gattrib.c ./bluez-5.47/attrib/utils.c ./bluez-5.47/btio/btio.c ./bluez-5.47/src/log.c ./bluez-5.47/src/shared/mgmt.c ./bluez-5.47/src/shared/crypto.c ./bluez-5.47/src/shared/att.c ./bluez-5.47/src/shared/queue.c ./bluez-5.47/src/shared/util.c ./bluez-5.47/src/shared/io-glib.c ./bluez-5.47/src/shared/timeout-glib.c \nbluepy-helper.c:33:10: fatal error: glib.h: No such file or directory\n #include\n ^ ~\ncompilation terminated.\n./bluez-5.47/attrib/att.c:33:10: fatal error: glib.h: No such file or directory\n #include\n ^ ~\ncompilation terminated.\n./bluez-5.47/attrib/gatt.c:32:10: fatal error: glib.h: No such file or directory\n #include\n ^ ~\ncompilation terminated.\n./bluez-5.47/attrib/gattrib.c:34:10: fatal error: glib.h: No such file or directory\n #include\n ^ ~\ncompilation terminated.\n./bluez-5.47/attrib/utils.c:30:10: fatal error: glib.h: No such file or directory\n #include\n ^ ~\ncompilation terminated.\n./bluez-5.47/btio/btio.c:37:10: fatal error: glib.h: No such file or directory\n #include\n ^ ~\ncompilation terminated.\n./bluez-5.47/src/log.c:38:10: fatal error: glib.h: No such file or directory\n #include\n ^ ~\ncompilation terminated.\n./bluez-5.47/src/shared/io-glib.c:30:10: fatal error: glib.h: No such file or directory\n #include\n ^ ~\ncompilation terminated.\n./bluez-5.47/src/shared/timeout-glib.c:22:10: fatal error: glib.h: No such file or directory\n #include\n ^ ~~~\ncompilation terminated.\nmake: *** [Makefile:30: bluepy-helper] Error 1\nmake: Leaving directory '/tmp/pip-install-awh6wojw/bluepy/bluepy'\n"
Which translates to
fatal error: glib.h: No such file or directory
Which let me to here
Where they advise to try:
sudo apt-get install libglib2.0-dev
Which solved the problem on my raspberry Pi
I am using rapsberian64 and in order to make it run I had to run this:
$ sudo apt-get install python3-pip libglib2.0-dev $ sudo pip3 install bluepy
Hey guys, in summary, what should be added to the README? PR welcome!!
As I faced the same issue, I suggest to added the following to the README, as by now this is not yet included:
In case you are running the service on an Raspberry Pi4 64 bit version, the following package is required too
sudo apt install libglib2.0-dev
Best Martin
Thanks!
I made a fresh installation on my RPi4 with 64bit Bullseye. So, Mosquitto, NodeRed and Zigbee2mqtt are really updated. I hope this daemon is exactly what I am looking for to read out miflora (and maybe other BLE-sensors, too)... but I cannot install: