I am trying to build PyVlfeat and it is failing with the following error.

/usr/bin/ld: cannot find -lboost_python-mt-py34
collect2: error: ld returned 1 exit status
error: command 'c++' failed with exit status 1

I have seen threads mentioning similar issue, but none of those seem to provide a proper solution and they seem to be quite old.

The issue here is that the installation script refers to "-lboost_python-mt-py26" option (parameter?) at one point. Some threads seem to reach a solution by changing their python interpreter version. (eg: py27 instead of py26).

However this doesn't work for me and I am unable to correct this reference. I have installed Boost by the command "sudo apt-get install libboost-all-dev".

How to fix this problem?

  • possible duplicate of Cannot find boost-thread-mt library – user.dz Nov 6 '14 at 13:08
  • As per the answer mentioned there, I have changed my reference to "-lboost_python-py27" and this time it seems to have compiled successfully. Thanks. However, I had python 2.7 and 3.4 in my system. How to find the proper boost libraries in my system so that I can use the correct one? If somebody can explain this in an answer, it will be very useful as I don't think much information regarding this is available in net. – Erdnase Nov 6 '14 at 14:23
  • 1
    It depends on which Python version you are using: for python2 use -lboost_python-py27, for python3 use -lboost_python-py34. See wiki.python.org/moin/Python2orPython3 . – user.dz Nov 6 '14 at 15:33

As it was mentioned, changing the reference to "-lboost_python-py27" helps to solve the problem.

The source of the information is Cannot find boost-thread-mt library

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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