We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
https://stackoverflow.com/questions/43721463/cant-install-gattlib-on-rasperry-pi-error-stray-xxx-in-program-on-usr-incl
sudo apt-get install libbluetooth-dev bluez bluez-hcidump libboost-python-dev libboost-thread-dev libglib2.0-dev sudo pip install gattlib
root@treehouses:~# cd /usr/local/bin root@treehouses:/usr/local/bin# ls bluetooth-server.py hub-ctrl my-ve sl wsdump.py do_autorun jsonschema __pycache__ terr youtube-dl docker-compose log2ram pypy3-v6.0.0-linux-armhf-raspbian.tar.bz2 uninstall-log2ram.sh root@treehouses:/usr/local/bin# service bluetooth stop root@treehouses:/usr/local/bin# nano bluetooth-server.py root@treehouses:/usr/local/bin# python3 bluetooth-server.py Traceback (most recent call last): File "bluetooth-server.py", line 12, in <module> import bluetooth.ble File "/usr/local/lib/python3.7/dist-packages/bluetooth/ble.py", line 1, in <module> from gattlib import * ModuleNotFoundError: No module named 'gattlib' root@treehouses:/usr/local/bin# pip3 install gattlib Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Collecting gattlib Downloading https://files.pythonhosted.org/packages/b1/d8/03cc2843e7235b7d2f55af7b3abec3cb94e14c0036dde10b505b6fe55f35/gattlib-0.20200122.tar.gz (44kB) 100% |████████████████████████████████| 51kB 793kB/s Complete output from command python setup.py egg_info: Package glib-2.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `glib-2.0.pc' to the PKG_CONFIG_PATH environment variable No package 'glib-2.0' found Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-install-qlisbjkt/gattlib/setup.py", line 12, in <module> "pkg-config --cflags glib-2.0".split()).decode('utf-8') File "/usr/lib/python3.7/subprocess.py", line 395, in check_output **kwargs).stdout File "/usr/lib/python3.7/subprocess.py", line 487, in run output=stdout, stderr=stderr) subprocess.CalledProcessError: Command '['pkg-config', '--cflags', 'glib-2.0']' returned non-zero exit status 1. ---------------------------------------- Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-qlisbjkt/gattlib/ root@treehouses:/usr/local/bin# pip3 install glib-2.0 Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Collecting glib-2.0 Could not install packages due to an EnvironmentError: 404 Client Error: Not Found for url: https://pypi.org/simple/glib-2-0/ root@treehouses:/usr/local/bin# python3 bluetooth-server.py Traceback (most recent call last): File "bluetooth-server.py", line 12, in <module> import bluetooth.ble File "/usr/local/lib/python3.7/dist-packages/bluetooth/ble.py", line 1, in <module> from gattlib import * ModuleNotFoundError: No module named 'gattlib' root@treehouses:/usr/local/bin# sudo python3 -m pip install pybluez pybluez\[ble\] Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Requirement already satisfied: pybluez in /usr/local/lib/python3.7/dist-packages (0.23) root@treehouses:/usr/local/bin# sudo apt-get install libboost-thread-dev Reading package lists... Done Building dependency tree Reading state information... Done The following package was automatically installed and is no longer required: libmicrodns0 Use 'sudo apt autoremove' to remove it. The following additional packages will be installed: libboost-atomic1.67-dev libboost-atomic1.67.0 libboost-chrono1.67-dev libboost-chrono1.67.0 libboost-date-time1.67-dev libboost-date-time1.67.0 libboost-serialization1.67-dev libboost-serialization1.67.0 libboost-system1.67-dev libboost-system1.67.0 libboost-thread1.67-dev libboost-thread1.67.0 libboost1.67-dev Suggested packages: libboost1.67-doc libboost-container1.67-dev libboost-context1.67-dev libboost-coroutine1.67-dev libboost-exception1.67-dev libboost-fiber1.67-dev libboost-filesystem1.67-dev libboost-graph1.67-dev libboost-graph-parallel1.67-dev libboost-iostreams1.67-dev libboost-locale1.67-dev libboost-log1.67-dev libboost-math1.67-dev libboost-mpi1.67-dev libboost-mpi-python1.67-dev libboost-numpy1.67-dev libboost-program-options1.67-dev libboost-python1.67-dev libboost-random1.67-dev libboost-regex1.67-dev libboost-signals1.67-dev libboost-stacktrace1.67-dev libboost-test1.67-dev libboost-timer1.67-dev libboost-type-erasure1.67-dev libboost-wave1.67-dev libboost1.67-tools-dev libmpfrc++-dev libntl-dev The following NEW packages will be installed: libboost-atomic1.67-dev libboost-atomic1.67.0 libboost-chrono1.67-dev libboost-chrono1.67.0 libboost-date-time1.67-dev libboost-date-time1.67.0 libboost-serialization1.67-dev libboost-serialization1.67.0 libboost-system1.67-dev libboost-system1.67.0 libboost-thread-dev libboost-thread1.67-dev libboost-thread1.67.0 libboost1.67-dev 0 upgraded, 14 newly installed, 0 to remove and 7 not upgraded. Need to get 11.4 MB of archives. After this operation, 158 MB of additional disk space will be used. Do you want to continue? [Y/n] Y Get:1 http://mirror.pit.teraswitch.com/raspbian/raspbian buster/main armhf libboost1.67-dev armhf 1.67.0-13+deb10u1 [8,388 kB] Get:2 http://raspbian.mirror.constant.com/raspbian buster/main armhf libboost-atomic1.67.0 armhf 1.67.0-13+deb10u1 [226 kB] Get:3 http://mirrors.ocf.berkeley.edu/raspbian/raspbian buster/main armhf libboost-atomic1.67-dev armhf 1.67.0-13+deb10u1 [225 kB] Get:4 http://raspbian.mirrors.lucidnetworks.net/raspbian buster/main armhf libboost-system1.67.0 armhf 1.67.0-13+deb10u1 [229 kB] Get:10 http://raspbian.mirror.constant.com/raspbian buster/main armhf libboost-date-time1.67-dev armhf 1.67.0-13+deb10u1 [248 kB] Get:5 http://mirror.pit.teraswitch.com/raspbian/raspbian buster/main armhf libboost-chrono1.67.0 armhf 1.67.0-13+deb10u1 [232 kB] Get:6 http://mirror.pit.teraswitch.com/raspbian/raspbian buster/main armhf libboost-chrono1.67-dev armhf 1.67.0-13+deb10u1 [233 kB] Get:9 http://mirrors.syringanetworks.net/raspbian/raspbian buster/main armhf libboost-serialization1.67-dev armhf 1.67.0-13+deb10u1 [365 kB] Get:7 http://mirror.pit.teraswitch.com/raspbian/raspbian buster/main armhf libboost-date-time1.67.0 armhf 1.67.0-13+deb10u1 [236 kB] Get:8 http://mirror.pit.teraswitch.com/raspbian/raspbian buster/main armhf libboost-serialization1.67.0 armhf 1.67.0-13+deb10u1 [301 kB] Get:12 http://mirror.pit.teraswitch.com/raspbian/raspbian buster/main armhf libboost-thread1.67.0 armhf 1.67.0-13+deb10u1 [260 kB] Get:13 http://mirror.pit.teraswitch.com/raspbian/raspbian buster/main armhf libboost-thread1.67-dev armhf 1.67.0-13+deb10u1 [268 kB] Get:14 http://raspbian.mirror.constant.com/raspbian buster/main armhf libboost-thread-dev armhf 1.67.0.1+b1 [3,952 B] Get:11 http://mirror.umd.edu/raspbian/raspbian buster/main armhf libboost-system1.67-dev armhf 1.67.0-13+deb10u1 [230 kB] Fetched 11.4 MB in 14s (810 kB/s) Selecting previously unselected package libboost1.67-dev:armhf. (Reading database ... 156544 files and directories currently installed.) Preparing to unpack .../00-libboost1.67-dev_1.67.0-13+deb10u1_armhf.deb ... Unpacking libboost1.67-dev:armhf (1.67.0-13+deb10u1) ... Selecting previously unselected package libboost-atomic1.67.0:armhf. Preparing to unpack .../01-libboost-atomic1.67.0_1.67.0-13+deb10u1_armhf.deb ... Unpacking libboost-atomic1.67.0:armhf (1.67.0-13+deb10u1) ... Selecting previously unselected package libboost-atomic1.67-dev:armhf. Preparing to unpack .../02-libboost-atomic1.67-dev_1.67.0-13+deb10u1_armhf.deb ... Unpacking libboost-atomic1.67-dev:armhf (1.67.0-13+deb10u1) ... Selecting previously unselected package libboost-system1.67.0:armhf. Preparing to unpack .../03-libboost-system1.67.0_1.67.0-13+deb10u1_armhf.deb ... Unpacking libboost-system1.67.0:armhf (1.67.0-13+deb10u1) ... Selecting previously unselected package libboost-chrono1.67.0:armhf. Preparing to unpack .../04-libboost-chrono1.67.0_1.67.0-13+deb10u1_armhf.deb ... Unpacking libboost-chrono1.67.0:armhf (1.67.0-13+deb10u1) ... Selecting previously unselected package libboost-chrono1.67-dev:armhf. Preparing to unpack .../05-libboost-chrono1.67-dev_1.67.0-13+deb10u1_armhf.deb ... Unpacking libboost-chrono1.67-dev:armhf (1.67.0-13+deb10u1) ... Selecting previously unselected package libboost-date-time1.67.0:armhf. Preparing to unpack .../06-libboost-date-time1.67.0_1.67.0-13+deb10u1_armhf.deb ... Unpacking libboost-date-time1.67.0:armhf (1.67.0-13+deb10u1) ... Selecting previously unselected package libboost-serialization1.67.0:armhf. Preparing to unpack .../07-libboost-serialization1.67.0_1.67.0-13+deb10u1_armhf.deb ... Unpacking libboost-serialization1.67.0:armhf (1.67.0-13+deb10u1) ... Selecting previously unselected package libboost-serialization1.67-dev:armhf. Preparing to unpack .../08-libboost-serialization1.67-dev_1.67.0-13+deb10u1_armhf.deb ... Unpacking libboost-serialization1.67-dev:armhf (1.67.0-13+deb10u1) ... Selecting previously unselected package libboost-date-time1.67-dev:armhf. Preparing to unpack .../09-libboost-date-time1.67-dev_1.67.0-13+deb10u1_armhf.deb ... Unpacking libboost-date-time1.67-dev:armhf (1.67.0-13+deb10u1) ... Selecting previously unselected package libboost-system1.67-dev:armhf. Preparing to unpack .../10-libboost-system1.67-dev_1.67.0-13+deb10u1_armhf.deb ... Unpacking libboost-system1.67-dev:armhf (1.67.0-13+deb10u1) ... Selecting previously unselected package libboost-thread1.67.0:armhf. Preparing to unpack .../11-libboost-thread1.67.0_1.67.0-13+deb10u1_armhf.deb ... Unpacking libboost-thread1.67.0:armhf (1.67.0-13+deb10u1) ... Selecting previously unselected package libboost-thread1.67-dev:armhf. Preparing to unpack .../12-libboost-thread1.67-dev_1.67.0-13+deb10u1_armhf.deb ... Unpacking libboost-thread1.67-dev:armhf (1.67.0-13+deb10u1) ... Selecting previously unselected package libboost-thread-dev:armhf. Preparing to unpack .../13-libboost-thread-dev_1.67.0.1+b1_armhf.deb ... Unpacking libboost-thread-dev:armhf (1.67.0.1+b1) ... Setting up libboost1.67-dev:armhf (1.67.0-13+deb10u1) ... Setting up libboost-date-time1.67.0:armhf (1.67.0-13+deb10u1) ... Setting up libboost-atomic1.67.0:armhf (1.67.0-13+deb10u1) ... Setting up libboost-system1.67.0:armhf (1.67.0-13+deb10u1) ... Setting up libboost-serialization1.67.0:armhf (1.67.0-13+deb10u1) ... Setting up libboost-atomic1.67-dev:armhf (1.67.0-13+deb10u1) ... Setting up libboost-serialization1.67-dev:armhf (1.67.0-13+deb10u1) ... Setting up libboost-chrono1.67.0:armhf (1.67.0-13+deb10u1) ... Setting up libboost-thread1.67.0:armhf (1.67.0-13+deb10u1) ... Setting up libboost-date-time1.67-dev:armhf (1.67.0-13+deb10u1) ... Setting up libboost-chrono1.67-dev:armhf (1.67.0-13+deb10u1) ... Setting up libboost-system1.67-dev:armhf (1.67.0-13+deb10u1) ... Setting up libboost-thread1.67-dev:armhf (1.67.0-13+deb10u1) ... Setting up libboost-thread-dev:armhf (1.67.0.1+b1) ... Processing triggers for libc-bin (2.28-10+rpi1) ... root@treehouses:/usr/local/bin# python3 bluetooth-server.py Traceback (most recent call last): File "bluetooth-server.py", line 12, in <module> import bluetooth.ble File "/usr/local/lib/python3.7/dist-packages/bluetooth/ble.py", line 1, in <module> from gattlib import * ModuleNotFoundError: No module named 'gattlib' root@treehouses:/usr/local/bin# pip3 install gattlib Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Collecting gattlib Using cached https://files.pythonhosted.org/packages/b1/d8/03cc2843e7235b7d2f55af7b3abec3cb94e14c0036dde10b505b6fe55f35/gattlib-0.20200122.tar.gz Complete output from command python setup.py egg_info: Package glib-2.0 was not found in the pkg-config search path. Perhaps you should add the directory containing `glib-2.0.pc' to the PKG_CONFIG_PATH environment variable No package 'glib-2.0' found Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-install-wzj__x94/gattlib/setup.py", line 12, in <module> "pkg-config --cflags glib-2.0".split()).decode('utf-8') File "/usr/lib/python3.7/subprocess.py", line 395, in check_output **kwargs).stdout File "/usr/lib/python3.7/subprocess.py", line 487, in run output=stdout, stderr=stderr) subprocess.CalledProcessError: Command '['pkg-config', '--cflags', 'glib-2.0']' returned non-zero exit status 1. ---------------------------------------- Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-wzj__x94/gattlib/ root@treehouses:/usr/local/bin# pip3 install glib-2.0 Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Collecting glib-2.0 Could not install packages due to an EnvironmentError: 404 Client Error: Not Found for url: https://pypi.org/simple/glib-2-0/ root@treehouses:/usr/local/bin# pip3 install glib Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Collecting glib Could not install packages due to an EnvironmentError: 404 Client Error: Not Found for url: https://pypi.org/simple/glib/ root@treehouses:/usr/local/bin# sudo apt-get install libglib2.0-dev Reading package lists... Done Building dependency tree Reading state information... Done The following package was automatically installed and is no longer required: libmicrodns0 Use 'sudo apt autoremove' to remove it. The following additional packages will be installed: libblkid-dev libglib2.0-dev-bin libmount-dev libpcre16-3 libpcre3-dev libpcre32-3 libpcrecpp0v5 libselinux1-dev libsepol1-dev uuid-dev Suggested packages: libglib2.0-doc libgdk-pixbuf2.0-bin | libgdk-pixbuf2.0-dev libxml2-utils The following NEW packages will be installed: libblkid-dev libglib2.0-dev libglib2.0-dev-bin libmount-dev libpcre16-3 libpcre3-dev libpcre32-3 libpcrecpp0v5 libselinux1-dev libsepol1-dev uuid-dev 0 upgraded, 11 newly installed, 0 to remove and 7 not upgraded. Need to get 3,679 kB of archives. After this operation, 14.5 MB of additional disk space will be used. Do you want to continue? [Y/n] Y Get:1 http://mirror.pit.teraswitch.com/raspbian/raspbian buster/main armhf uuid-dev armhf 2.33.1-0.1 [92.4 kB] Get:2 http://mirror.us.leaseweb.net/raspbian/raspbian buster/main armhf libblkid-dev armhf 2.33.1-0.1 [210 kB] Get:4 http://mirror.pit.teraswitch.com/raspbian/raspbian buster/main armhf libmount-dev armhf 2.33.1-0.1 [209 kB] Get:3 http://mirror.web-ster.com/raspbian/raspbian buster/main armhf libglib2.0-dev-bin armhf 2.58.3-2+deb10u2 [155 kB] Get:5 http://mirror.us.leaseweb.net/raspbian/raspbian buster/main armhf libpcre16-3 armhf 2:8.39-12 [234 kB] Get:6 http://mirror.us.leaseweb.net/raspbian/raspbian buster/main armhf libpcre32-3 armhf 2:8.39-12 [227 kB] Get:7 http://mirrors.gigenet.com/raspbian/raspbian buster/main armhf libpcrecpp0v5 armhf 2:8.39-12 [150 kB] Get:8 http://mirror.pit.teraswitch.com/raspbian/raspbian buster/main armhf libpcre3-dev armhf 2:8.39-12 [564 kB] Get:9 http://raspbian.mirror.constant.com/raspbian buster/main armhf libsepol1-dev armhf 2.8-1 [309 kB] Get:10 http://mirror.pit.teraswitch.com/raspbian/raspbian buster/main armhf libselinux1-dev armhf 2.8-1+b1 [156 kB] Get:11 http://mirror.pit.teraswitch.com/raspbian/raspbian buster/main armhf libglib2.0-dev armhf 2.58.3-2+deb10u2 [1,372 kB] Fetched 3,679 kB in 7s (523 kB/s) Selecting previously unselected package uuid-dev:armhf. (Reading database ... 171099 files and directories currently installed.) Preparing to unpack .../00-uuid-dev_2.33.1-0.1_armhf.deb ... Unpacking uuid-dev:armhf (2.33.1-0.1) ... Selecting previously unselected package libblkid-dev:armhf. Preparing to unpack .../01-libblkid-dev_2.33.1-0.1_armhf.deb ... Unpacking libblkid-dev:armhf (2.33.1-0.1) ... Selecting previously unselected package libglib2.0-dev-bin. Preparing to unpack .../02-libglib2.0-dev-bin_2.58.3-2+deb10u2_armhf.deb ... Unpacking libglib2.0-dev-bin (2.58.3-2+deb10u2) ... Selecting previously unselected package libmount-dev:armhf. Preparing to unpack .../03-libmount-dev_2.33.1-0.1_armhf.deb ... Unpacking libmount-dev:armhf (2.33.1-0.1) ... Selecting previously unselected package libpcre16-3:armhf. Preparing to unpack .../04-libpcre16-3_2%3a8.39-12_armhf.deb ... Unpacking libpcre16-3:armhf (2:8.39-12) ... Selecting previously unselected package libpcre32-3:armhf. Preparing to unpack .../05-libpcre32-3_2%3a8.39-12_armhf.deb ... Unpacking libpcre32-3:armhf (2:8.39-12) ... Selecting previously unselected package libpcrecpp0v5:armhf. Preparing to unpack .../06-libpcrecpp0v5_2%3a8.39-12_armhf.deb ... Unpacking libpcrecpp0v5:armhf (2:8.39-12) ... Selecting previously unselected package libpcre3-dev:armhf. Preparing to unpack .../07-libpcre3-dev_2%3a8.39-12_armhf.deb ... Unpacking libpcre3-dev:armhf (2:8.39-12) ... Selecting previously unselected package libsepol1-dev:armhf. Preparing to unpack .../08-libsepol1-dev_2.8-1_armhf.deb ... Unpacking libsepol1-dev:armhf (2.8-1) ... Selecting previously unselected package libselinux1-dev:armhf. Preparing to unpack .../09-libselinux1-dev_2.8-1+b1_armhf.deb ... Unpacking libselinux1-dev:armhf (2.8-1+b1) ... Selecting previously unselected package libglib2.0-dev:armhf. Preparing to unpack .../10-libglib2.0-dev_2.58.3-2+deb10u2_armhf.deb ... Unpacking libglib2.0-dev:armhf (2.58.3-2+deb10u2) ... Setting up libpcrecpp0v5:armhf (2:8.39-12) ... Setting up libglib2.0-dev-bin (2.58.3-2+deb10u2) ... Setting up libpcre16-3:armhf (2:8.39-12) ... Setting up libsepol1-dev:armhf (2.8-1) ... Setting up uuid-dev:armhf (2.33.1-0.1) ... Setting up libpcre32-3:armhf (2:8.39-12) ... Setting up libblkid-dev:armhf (2.33.1-0.1) ... Setting up libpcre3-dev:armhf (2:8.39-12) ... Setting up libmount-dev:armhf (2.33.1-0.1) ... Setting up libselinux1-dev:armhf (2.8-1+b1) ... Setting up libglib2.0-dev:armhf (2.58.3-2+deb10u2) ... Processing triggers for libc-bin (2.28-10+rpi1) ... Processing triggers for man-db (2.8.5-2) ... Processing triggers for libglib2.0-0:armhf (2.58.3-2+deb10u2) ... root@treehouses:/usr/local/bin# pip3 install gattlib Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Collecting gattlib Using cached https://files.pythonhosted.org/packages/b1/d8/03cc2843e7235b7d2f55af7b3abec3cb94e14c0036dde10b505b6fe55f35/gattlib-0.20200122.tar.gz Building wheels for collected packages: gattlib Running setup.py bdist_wheel for gattlib ... error Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-__5dzot9/gattlib/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-0aiy_twu --python-tag cp37: running bdist_wheel running build running build_ext building 'gattlib' extension creating build creating build/temp.linux-armv7l-3.7 creating build/temp.linux-armv7l-3.7/src creating build/temp.linux-armv7l-3.7/src/bluez creating build/temp.linux-armv7l-3.7/src/bluez/lib creating build/temp.linux-armv7l-3.7/src/bluez/attrib creating build/temp.linux-armv7l-3.7/src/bluez/src creating build/temp.linux-armv7l-3.7/src/bluez/src/shared creating build/temp.linux-armv7l-3.7/src/bluez/btio arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -Isrc/bluez -I/usr/include/python3.7m -c src/gattservices.cpp -o build/temp.linux-armv7l-3.7/src/gattservices.o arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -Isrc/bluez -I/usr/include/python3.7m -c src/beacon.cpp -o build/temp.linux-armv7l-3.7/src/beacon.o arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -Isrc/bluez -I/usr/include/python3.7m -c src/bindings.cpp -o build/temp.linux-armv7l-3.7/src/bindings.o arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -Isrc/bluez -I/usr/include/python3.7m -c src/gattlib.cpp -o build/temp.linux-armv7l-3.7/src/gattlib.o arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -Isrc/bluez -I/usr/include/python3.7m -c src/bluez/lib/uuid.c -o build/temp.linux-armv7l-3.7/src/bluez/lib/uuid.o arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -Isrc/bluez -I/usr/include/python3.7m -c src/bluez/attrib/gatt.c -o build/temp.linux-armv7l-3.7/src/bluez/attrib/gatt.o arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -Isrc/bluez -I/usr/include/python3.7m -c src/bluez/attrib/gattrib.c -o build/temp.linux-armv7l-3.7/src/bluez/attrib/gattrib.o arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -Isrc/bluez -I/usr/include/python3.7m -c src/bluez/attrib/utils.c -o build/temp.linux-armv7l-3.7/src/bluez/attrib/utils.o arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -Isrc/bluez -I/usr/include/python3.7m -c src/bluez/attrib/att.c -o build/temp.linux-armv7l-3.7/src/bluez/attrib/att.o arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -Isrc/bluez -I/usr/include/python3.7m -c src/bluez/src/shared/crypto.c -o build/temp.linux-armv7l-3.7/src/bluez/src/shared/crypto.o arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -Isrc/bluez -I/usr/include/python3.7m -c src/bluez/src/log.c -o build/temp.linux-armv7l-3.7/src/bluez/src/log.o arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -Isrc/bluez -I/usr/include/python3.7m -c src/bluez/btio/btio.c -o build/temp.linux-armv7l-3.7/src/bluez/btio/btio.o creating build/lib.linux-armv7l-3.7 arm-linux-gnueabihf-g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-armv7l-3.7/src/gattservices.o build/temp.linux-armv7l-3.7/src/beacon.o build/temp.linux-armv7l-3.7/src/bindings.o build/temp.linux-armv7l-3.7/src/gattlib.o build/temp.linux-armv7l-3.7/src/bluez/lib/uuid.o build/temp.linux-armv7l-3.7/src/bluez/attrib/gatt.o build/temp.linux-armv7l-3.7/src/bluez/attrib/gattrib.o build/temp.linux-armv7l-3.7/src/bluez/attrib/utils.o build/temp.linux-armv7l-3.7/src/bluez/attrib/att.o build/temp.linux-armv7l-3.7/src/bluez/src/shared/crypto.o build/temp.linux-armv7l-3.7/src/bluez/src/log.o build/temp.linux-armv7l-3.7/src/bluez/btio/btio.o -lglib-2.0 -lboost_python37 -lboost_thread -lbluetooth -o build/lib.linux-armv7l-3.7/gattlib.cpython-37m-arm-linux-gnueabihf.so /usr/bin/ld: cannot find -lboost_python37 collect2: error: ld returned 1 exit status error: command 'arm-linux-gnueabihf-g++' failed with exit status 1 ---------------------------------------- Failed building wheel for gattlib Running setup.py clean for gattlib Failed to build gattlib Installing collected packages: gattlib Running setup.py install for gattlib ... error Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-__5dzot9/gattlib/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-avg_42sc/install-record.txt --single-version-externally-managed --compile: running install running build running build_ext building 'gattlib' extension creating build creating build/temp.linux-armv7l-3.7 creating build/temp.linux-armv7l-3.7/src creating build/temp.linux-armv7l-3.7/src/bluez creating build/temp.linux-armv7l-3.7/src/bluez/lib creating build/temp.linux-armv7l-3.7/src/bluez/attrib creating build/temp.linux-armv7l-3.7/src/bluez/src creating build/temp.linux-armv7l-3.7/src/bluez/src/shared creating build/temp.linux-armv7l-3.7/src/bluez/btio arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -Isrc/bluez -I/usr/include/python3.7m -c src/gattservices.cpp -o build/temp.linux-armv7l-3.7/src/gattservices.o arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -Isrc/bluez -I/usr/include/python3.7m -c src/beacon.cpp -o build/temp.linux-armv7l-3.7/src/beacon.o arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -Isrc/bluez -I/usr/include/python3.7m -c src/bindings.cpp -o build/temp.linux-armv7l-3.7/src/bindings.o arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -Isrc/bluez -I/usr/include/python3.7m -c src/gattlib.cpp -o build/temp.linux-armv7l-3.7/src/gattlib.o arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -Isrc/bluez -I/usr/include/python3.7m -c src/bluez/lib/uuid.c -o build/temp.linux-armv7l-3.7/src/bluez/lib/uuid.o arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -Isrc/bluez -I/usr/include/python3.7m -c src/bluez/attrib/gatt.c -o build/temp.linux-armv7l-3.7/src/bluez/attrib/gatt.o arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -Isrc/bluez -I/usr/include/python3.7m -c src/bluez/attrib/gattrib.c -o build/temp.linux-armv7l-3.7/src/bluez/attrib/gattrib.o arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -Isrc/bluez -I/usr/include/python3.7m -c src/bluez/attrib/utils.c -o build/temp.linux-armv7l-3.7/src/bluez/attrib/utils.o arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -Isrc/bluez -I/usr/include/python3.7m -c src/bluez/attrib/att.c -o build/temp.linux-armv7l-3.7/src/bluez/attrib/att.o arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -Isrc/bluez -I/usr/include/python3.7m -c src/bluez/src/shared/crypto.c -o build/temp.linux-armv7l-3.7/src/bluez/src/shared/crypto.o arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -Isrc/bluez -I/usr/include/python3.7m -c src/bluez/src/log.c -o build/temp.linux-armv7l-3.7/src/bluez/src/log.o arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -DVERSION="5.25" -I/usr/include/glib-2.0 -I/usr/lib/arm-linux-gnueabihf/glib-2.0/include -Isrc/bluez -I/usr/include/python3.7m -c src/bluez/btio/btio.c -o build/temp.linux-armv7l-3.7/src/bluez/btio/btio.o creating build/lib.linux-armv7l-3.7 arm-linux-gnueabihf-g++ -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,relro -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-armv7l-3.7/src/gattservices.o build/temp.linux-armv7l-3.7/src/beacon.o build/temp.linux-armv7l-3.7/src/bindings.o build/temp.linux-armv7l-3.7/src/gattlib.o build/temp.linux-armv7l-3.7/src/bluez/lib/uuid.o build/temp.linux-armv7l-3.7/src/bluez/attrib/gatt.o build/temp.linux-armv7l-3.7/src/bluez/attrib/gattrib.o build/temp.linux-armv7l-3.7/src/bluez/attrib/utils.o build/temp.linux-armv7l-3.7/src/bluez/attrib/att.o build/temp.linux-armv7l-3.7/src/bluez/src/shared/crypto.o build/temp.linux-armv7l-3.7/src/bluez/src/log.o build/temp.linux-armv7l-3.7/src/bluez/btio/btio.o -lglib-2.0 -lboost_python37 -lboost_thread -lbluetooth -o build/lib.linux-armv7l-3.7/gattlib.cpython-37m-arm-linux-gnueabihf.so /usr/bin/ld: cannot find -lboost_python37 collect2: error: ld returned 1 exit status error: command 'arm-linux-gnueabihf-g++' failed with exit status 1 ---------------------------------------- Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-__5dzot9/gattlib/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-avg_42sc/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-install-__5dzot9/gattlib/ root@treehouses:/usr/local/bin# apt update Get:1 http://archive.raspberrypi.org/debian buster InRelease [25.1 kB] Get:2 http://raspbian.raspberrypi.org/raspbian buster InRelease [15.0 kB] Hit:3 https://packages.cloud.google.com/apt coral-cloud-stable InRelease Get:4 https://download.docker.com/linux/raspbian stretch InRelease [31.1 kB] Hit:5 https://deb.nodesource.com/node_10.x buster InRelease Get:6 http://raspbian.raspberrypi.org/raspbian buster/main armhf Packages [13.0 MB] Get:7 http://archive.raspberrypi.org/debian buster/main armhf Packages [329 kB] Hit:8 http://deb.torproject.org/torproject.org buster InRelease Get:9 https://download.docker.com/linux/raspbian stretch/stable armhf Packages [9,690 B] Fetched 13.4 MB in 21s (625 kB/s) Reading package lists... Done Building dependency tree Reading state information... Done 25 packages can be upgraded. Run 'apt list --upgradable' to see them. root@treehouses:/usr/local/bin# sudo apt-get install libbluetooth-dev bluez bluez-hcidump libboost-python-dev libboost-thread-dev libglib2.0-dev Reading package lists... Done Building dependency tree Reading state information... Done libboost-thread-dev is already the newest version (1.67.0.1+b1). libglib2.0-dev is already the newest version (2.58.3-2+deb10u2). bluez is already the newest version (5.50-1.2~deb10u1+rpt1). libbluetooth-dev is already the newest version (5.50-1.2~deb10u1+rpt1). The following package was automatically installed and is no longer required: libmicrodns0 Use 'sudo apt autoremove' to remove it. The following additional packages will be installed: libboost-python1.67-dev libboost-python1.67.0 Suggested packages: libboost1.67-doc gccxml The following NEW packages will be installed: bluez-hcidump libboost-python-dev libboost-python1.67-dev libboost-python1.67.0 0 upgraded, 4 newly installed, 0 to remove and 25 not upgraded. Need to get 779 kB of archives. After this operation, 6,053 kB of additional disk space will be used. Do you want to continue? [Y/n] Y Abort. root@treehouses:/usr/local/bin# sudo apt-get install libbluetooth-dev bluez bluez-hcidump libboost-python-dev libboost-thread-dev libglib2.0-dev Reading package lists... Done Building dependency tree Reading state information... Done libboost-thread-dev is already the newest version (1.67.0.1+b1). libglib2.0-dev is already the newest version (2.58.3-2+deb10u2). bluez is already the newest version (5.50-1.2~deb10u1+rpt1). libbluetooth-dev is already the newest version (5.50-1.2~deb10u1+rpt1). The following package was automatically installed and is no longer required: libmicrodns0 Use 'sudo apt autoremove' to remove it. The following additional packages will be installed: libboost-python1.67-dev libboost-python1.67.0 Suggested packages: libboost1.67-doc gccxml The following NEW packages will be installed: bluez-hcidump libboost-python-dev libboost-python1.67-dev libboost-python1.67.0 0 upgraded, 4 newly installed, 0 to remove and 25 not upgraded. Need to get 779 kB of archives. After this operation, 6,053 kB of additional disk space will be used. Do you want to continue? [Y/n] Y Get:1 http://archive.raspberrypi.org/debian buster/main armhf bluez-hcidump armhf 5.50-1.2~deb10u1+rpt1 [151 kB] Get:2 http://mirrors.syringanetworks.net/raspbian/raspbian buster/main armhf libboost-python1.67.0 armhf 1.67.0-13+deb10u1 [306 kB] Get:3 http://mirror.pit.teraswitch.com/raspbian/raspbian buster/main armhf libboost-python1.67-dev armhf 1.67.0-13+deb10u1 [318 kB] Get:4 http://raspbian.mirror.constant.com/raspbian buster/main armhf libboost-python-dev armhf 1.67.0.1+b1 [4,224 B] Fetched 779 kB in 3s (250 kB/s) Selecting previously unselected package bluez-hcidump. (Reading database ... 171908 files and directories currently installed.) Preparing to unpack .../bluez-hcidump_5.50-1.2~deb10u1+rpt1_armhf.deb ... Unpacking bluez-hcidump (5.50-1.2~deb10u1+rpt1) ... Selecting previously unselected package libboost-python1.67.0. Preparing to unpack .../libboost-python1.67.0_1.67.0-13+deb10u1_armhf.deb ... Unpacking libboost-python1.67.0 (1.67.0-13+deb10u1) ... Selecting previously unselected package libboost-python1.67-dev. Preparing to unpack .../libboost-python1.67-dev_1.67.0-13+deb10u1_armhf.deb ... Unpacking libboost-python1.67-dev (1.67.0-13+deb10u1) ... Selecting previously unselected package libboost-python-dev. Preparing to unpack .../libboost-python-dev_1.67.0.1+b1_armhf.deb ... Unpacking libboost-python-dev (1.67.0.1+b1) ... Setting up bluez-hcidump (5.50-1.2~deb10u1+rpt1) ... Setting up libboost-python1.67.0 (1.67.0-13+deb10u1) ... Setting up libboost-python1.67-dev (1.67.0-13+deb10u1) ... Setting up libboost-python-dev (1.67.0.1+b1) ... Processing triggers for man-db (2.8.5-2) ... Processing triggers for libc-bin (2.28-10+rpi1) ... root@treehouses:/usr/local/bin# pip3 install gattlib Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Collecting gattlib Using cached https://files.pythonhosted.org/packages/b1/d8/03cc2843e7235b7d2f55af7b3abec3cb94e14c0036dde10b505b6fe55f35/gattlib-0.20200122.tar.gz Building wheels for collected packages: gattlib Running setup.py bdist_wheel for gattlib ... done Stored in directory: /root/.cache/pip/wheels/a4/97/8d/dc088f37e22aee585688fc2dd9b650c97449467d39ca38ec6f Successfully built gattlib Installing collected packages: gattlib Successfully installed gattlib-0.20200122 root@treehouses:/usr/local/bin# python3 bluetooth-server.py Debug logs enabled Setting device name: 'treehouses-4170' Discoverable enabled Listening on port 0 Main thread waiting for connections ^CTraceback (most recent call last): File "bluetooth-server.py", line 155, in <module> multithreaded_server.run() File "bluetooth-server.py", line 137, in run self.accept_connections() File "bluetooth-server.py", line 114, in accept_connections client_sock, address = self.server_sock.accept() File "/usr/local/lib/python3.7/dist-packages/bluetooth/bluez.py", line 179, in accept client, addr = self._sock.accept () KeyboardInterrupt During handling of the above exception, another exception occurred: Traceback (most recent call last): File "bluetooth-server.py", line 157, in <module> self._logger.info("shutting down the server") NameError: name 'self' is not defined Error in sys.excepthook: Traceback (most recent call last): File "bluetooth-server.py", line 17, in _ExceptionHandler os.kill(os.getpid(), signal.SIGINT) KeyboardInterrupt Original exception was: Traceback (most recent call last): File "bluetooth-server.py", line 155, in <module> multithreaded_server.run() File "bluetooth-server.py", line 137, in run self.accept_connections() File "bluetooth-server.py", line 114, in accept_connections client_sock, address = self.server_sock.accept() File "/usr/local/lib/python3.7/dist-packages/bluetooth/bluez.py", line 179, in accept client, addr = self._sock.accept () KeyboardInterrupt During handling of the above exception, another exception occurred: Traceback (most recent call last): File "bluetooth-server.py", line 157, in <module> self._logger.info("shutting down the server") NameError: name 'self' is not defined root@treehouses:/usr/local/bin#
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
https://stackoverflow.com/questions/43721463/cant-install-gattlib-on-rasperry-pi-error-stray-xxx-in-program-on-usr-incl
The text was updated successfully, but these errors were encountered: