0

Like many others, I've had problems installing gattlib using pip.

I've followed the steps outline in this question to no avail:

Pybluez and Gattlib error

The steps that give me the error:

hg clone https://bitbucket.org/OscarAcena/pygattlib
cd pygattlib
cat DEPENDS

sudo ln -s /usr/lib/arm-linux-gnueabihf/libboost_python-py35.so /usr/lib/arm-linux-gnueabihf/libboost_python-py36.so

sudo python3 setup.py install

The error I get:

/usr/bin/ld: cannot find -lboost_python36
collect2: error: ld returned 1 exit status
error: command 'g++' failed with exit status 1

It seems I do have libboost_python installed:

pi@raspberrypi:~/pygattlib $ ldconfig -p | grep libboost_python
        libboost_python-py35.so.1.62.0 (libc6,hard-float) => /usr/lib/arm-linux-gnueabihf/libboost_python-py35.so.1.62.0
        libboost_python-py35.so (libc6,hard-float) => /usr/lib/arm-linux-gnueabihf/libboost_python-py35.so
        libboost_python-py27.so.1.62.0 (libc6,hard-float) => /usr/lib/arm-linux-gnueabihf/libboost_python-py27.so.1.62.0
        libboost_python-py27.so (libc6,hard-float) => /usr/lib/arm-linux-gnueabihf/libboost_python-py27.so

What else can I try to figure this out?

2 Answers 2

3

That happened with my Raspberry Pi 4, I could fix by running below command, 100% worked:

sudo apt install pkg-config libboost-python-dev libboost-thread-dev libbluetooth-dev libglib2.0-dev python-dev
0

Figured it out.

Since this command returned libboost_python35:

pi@raspberrypi:~/pygattlib $ ldconfig -p | grep libboost_python
        libboost_python-py35.so.1.62.0 (libc6,hard-float) => /usr/lib/arm-linux-gnueabihf/libboost_python-py35.so.1.62.0
        libboost_python-py35.so (libc6,hard-float) => /usr/lib/arm-linux-gnueabihf/libboost_python-py35.so
        libboost_python-py27.so.1.62.0 (libc6,hard-float) => /usr/lib/arm-linux-gnueabihf/libboost_python-py27.so.1.62.0
        libboost_python-py27.so (libc6,hard-float) => /usr/lib/arm-linux-gnueabihf/libboost_python-py27.so

In setup.py I set boost_libs equal to this:

boost_libs = ["boost_python-py35"]
1
  • 1
    Please accept your own answer with a click on the tick on its left side. Only this will finish the question and it will not pop up again year for year.
    – Ingo
    Commented Jun 29, 2020 at 9:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.