Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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

I have the latest CUDA toolkit and drivers installed on a 12.04 server. The drivers are working fine: all the NVIDIA sample code compiles and runs and I've written, compiled, and run several CUDA programs. The other day I went to use the new nvprof command line profiler and was greeted with the following error:

Error: unable to locate profiling library

I double checked the CUDA libraries and that specific library is in fact included in the LD_LIBRARY_PATH. (I used the method described here). Running ldconfig -v shows that all the Cuda libraries are loaded into LD_LIBRARY_PATH:

/usr/local/cuda-5.0/lib: -> -> -> ->
    ** ->** -> -> ->
/usr/local/cuda-5.0/lib64: -> -> -> -> -> -> -> ->

The offending library is in bold. At this point the old command line compiler works fine, the compiler itself works fine, so it seems to be nvprof specific.

I'm not sure if this is Ubuntu or the nvprof build provided by NVIDIA. Does anyone have an experience with running nvprof under 12.04 or even 12.10? Anyone seen this problem before? I realize this is a fairly niche question but you never know.

UPDATE: This problem seems to persist on Ubuntu 12.04 with CUDA 5.5 (released on August 1, 2013). The fix still works, you just have to use the updated library (see below).

share|improve this question
Update for CUDA 6.0: This issue appears to be fixed for the 6.0 release candidate :). I installed the RC version using the deb provided by NVIDIA. – Logan Mayfield Mar 15 '14 at 12:59
up vote 2 down vote accepted

I know this is old, but this is still the first hit on google for this problem and I wanted to let people know how to fix it. Looking at strace told me that it wasn't finding the library in any of the paths (looks like it is looking through a different set of folders for some reason). Regardless, I just linked my copy of the library into one of the directories that it was looking at, and it worked perfectly fine. I ran this code:

sudo ln -s `locate` /usr/lib/x86_64-linux-gnu/ 

You can just run the locate command on its own if you want to put it in manually, but if you only have one copy of the library this will work fine. Create the upper level directory first if you don't have it for some reason:

sudo mkdir -p /usr/lib/x86_64-linux-gnu/

Hope this helps!

Update for CUDA 5.5: The library for CUDA 5.5 is So, the one line command is:

sudo ln -s `locate` /usr/lib/x86_64-linux-gnu/
share|improve this answer
awesome. thanks! – Logan Mayfield Jun 7 '13 at 11:49

It's probably due to a not correctly set $LD_LIBRARY_PATH. This environment variable should include the path to the CUDA library. Example:

setenv QUDA_INSTALL_PATH /usr/local/cuda/lib64 

share|improve this answer
Like I said, I'm pretty sure that is not the problem. I added some details to the question to show how I ruled that out. – Logan Mayfield Apr 10 '13 at 17:27
Maybe it's a 32bit vs 64bit issue? Also you could try using the LD_PRELOAD trick – Frank Apr 10 '13 at 18:49
Tried $ LD_PRELOAD=/path/to/lib nvprof myprogram and got the same error. So if I did the trick right, that's a no go as well. – Logan Mayfield Apr 11 '13 at 15:23

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.