CUDA 9.1 - Missing libraries and PATH / LD_LIBRARY_PATH issues

I downloaded the runfile[local]-file and installed CUDA Toolkit 9.1 (Ubuntu 16.04), started:

$ sudo sh 

and here is my terminal response, all questions -> “yes”, all locations -> default (command-line prompts):

Installing the NVIDIA display driver…
Installing the CUDA Toolkit in /usr/local/cuda-9.1 …
Missing recommended library:
Missing recommended library:
Missing recommended library:
Missing recommended library:

Installing the CUDA Samples in /home/username …
Copying samples to /home/username/NVIDIA_CUDA-9.1_Samples now…
Finished copying samples.

= Summary =

Driver: Installed
Toolkit: Installed in /usr/local/cuda-9.1
Samples: Installed in /home/username, but missing recommended libraries

Please make sure that

  • PATH includes /usr/local/cuda-9.1/bin
  • LD_LIBRARY_PATH includes /usr/local/cuda-9.1/lib64, or, add /usr/local/cuda-9.1/lib64 to /etc/ and run ldconfig as root

To uninstall the CUDA Toolkit, run the uninstall script in /usr/local/cuda-9.1/bin
To uninstall the NVIDIA Driver, run nvidia-uninstall

Please see CUDA_Installation_Guide_Linux.pdf in /usr/local/cuda-9.1/doc/pdf for detailed information on setting up CUDA.

Logfile is /tmp/cuda_install_11273.log

How can I fix the missing libraries and what can I do about this PATH / LD_LIBRARY_PATH including issue?

The PATH and LD_LIBRARY_PATH are important and should be set appropriately. The linux install guide gives instructions:

What to do about the missing libraries is documented in many places on the internet. These are not libraries provided by NVIDIA, and generally shouldn’t prevent you from successfully using CUDA. However they are needed for CUDA /OpenGL interop, and not having them will prevent sample codes based on that from running correctly.

Thank you so much! I could find everything that I was looking for.

Just the “GLPATH=/usr/lib make”-command didnt work for the downloaded libraries.

My response here is:

make: *** Es wurden keine Ziele angegeben und keine „make“-Steuerdatei gefunden. Schluss.
(make: *** No targets were specified and no “make” control file was found. Finish.)

Any idea how I can change this command to make it work? :)

If you’re trying to build the samples with that, you need to issue that command in the samples directory, where the samples Makefile is. On a typical linux install, that would be /usr/local/cuda/samples

The error message looks like you’re issuing that command somewhere else, where there is no Makefile.

So you mean

$ GLPATH=/usr/local/cuda/samples

without “make”? With “make”, I get the same error as above.

(I just did without “make” and there was no error…)

no, I mean:

cd /usr/local/cuda/samples
GLPATH=/usr/bin make

Note that to issue make that way, in that directory, you need to be root. So do something like

sudo su

first. Alternatively, since you installed the samples (it appears) in your home directory, should be able to do:

cd /home/username/NVIDIA_CUDA-9.1_Samples
GLPATH=/usr/bin make

without being root, instead.

having said that, the GLPATH=/usr/bin preface to the make command only makes sense/is useful if the necessary libraries can be found in /usr/bin

It’s not a magical fix, otherwise.

I unfortunately did the first two commands without being root, because I was so happy and then, out of desparation, tried the second two commands too, which gave me couple errors again.

Now I m thinking to do the first two commands with sudo su again…

It helps if you know something about linux and the make system, so you can do basic investigation yourself.

In order to issue the command:


it would be normal/typical that in whatever directory you issued that command, there would be a file called:


the “make” command will then inspect that Makefile, to decide what to do. This is a drastically condensed description of a complex system.

So the first thing you might do, before issuing “make” is to see if there is a “Makefile” (i.e. a file with that exact name) in the directory you are currently in. If there isn’t, then you are probably doing something wrong. The initial error message you posted in this thread is indicating exactly that - there is no Makefile, so “make” doesn’t know what to do.

Thank you for being so patient with me.

Unfortunately, I ended up in a login-loop and finally had to buy a new drive and reinstall Ubuntu 16.04 completely (after 24h of trouble-shoot tutorials).

I had no output at “$ lspci | grep -i nvidia” and dont really understand how to “enter update-pciids” (got no file like this in /sbin and get error when I type it in terminal), so I just remembered from years ago, that Intel comes with Nvidia somehow generally(?).

Now I m confused even more because my motherboard is a MSI MS-7817 with graphic onboard. As I understand from the specifications, it only got an “Intel H81 (C2) Chip” and might not be able to recognize a graphic-card, even if I’d buy one for the PCI-slot, says “Multi-GPU: N/A”?

So from this point, it doesnt even make sense download CUDA without having a Nvidia device connected, does it?

So, there s no need for me install cuda, this might also have been the reason my system crashed?

Unfortunately, the software I wanted to install earlier, required Cuda-Package during install. Else, I would never ended up here. :)

If you don’t have a nvidia gpu, CUDA won’t be useful.