Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Trying to install PyCuda I followed these instructions as I ran into that problem but unfortunately I am still getting the error:

c++ -pthread -shared -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/src/cpp/cuda.o build/temp.linux-x86_64-2.7/src/cpp/bitlog.o build/temp.linux-x86_64-2.7/src/wrapper/wrap_cudadrv.o build/temp.linux-x86_64-2.7/src/wrapper/mempool.o build/temp.linux-x86_64-2.7/src/wrapper/wrap_curand.o -L/usr/local/cuda/lib -L/usr/local/cuda/lib64 -lboost_python-mt-py27 -lboost_thread-mt -lcuda -lcurand -o build/lib.linux-x86_64-2.7/pycuda/
/usr/bin/ld: cannot find -lboost_python-mt-py27
/usr/bin/ld: cannot find -lboost_thread-mt
/usr/bin/ld: skipping incompatible /usr/local/cuda/lib/ when searching for -lcurand
collect2: error: ld returned 1 exit status
error: command 'c++' failed with exit status 1
make: *** [install] Error 1

I found the linking file libboost_python-mt in /usr/lib/ but it seems referencing /usr/lib/libboost_python-mt-py26 which does not exist. Though /usr/lib/libboost_python-mt-py27 does ..

Can anybody help me here?

share|improve this question

Try changing the "boost-python-libname" argument for from:




Adding the 27 will link directly to the library you say you have installed

This is what worked for me on Ubuntu 12.04 with manual CUDA 5.5 install (not from the ubuntu repository).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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