Issues with RHEL 7.3 and missing libraries for CUDA examples

When I install NVIDIA drivers, CUDA 8 Toolkit Examples and then “Make” them, I get errors regarding the lack of libraries containing,, gl.h, glu.h, Xlib.h for use with NVIDIA CUDA applications.

I receive a message telling me to find a resolution to these errors in the “CUDA Getting Started Guide”. Unfortunately, it appears the “CUDA Getting Started Guide” has no information on how to actually resolve these errors.

What libraries and packages do I need to install that will resolve these issues and do not conflict with the NVIDIA installed libraries?

I have used Google to try to find a solution and have searched this forum - both with no results.


Jim Kress

Yes, the first one refers to Ubuntu.
The second refers to Fedora, the methodology should be basically identical for RHEL.

It helps to have some dexterity with yum.

Thanks for the reply. Will installing the MESA libraries interfere with NVIDIA and/ or CUDA operation? For example, the Getting Started Guide states:

Installing Mesa may overwrite the /usr/lib/ that was previously
installed by the NVIDIA driver, so a reinstallation of the NVIDIA driver might be
required after installing these libraries

Is this an issue about which I should be concerned?

Yes, potentially.

This is a somewhat involved topic.

Do you even care about these sample codes? They mostly pertain to CUDA/OpenGL interop. If you’re not too concerned about that, it may be easier to skip these. You can do that by issueing make -k for example.

If these samples are important, but you have little knowledge of handling X/OGL displays on linux, that seems like an odd combination to me.

Some additional questions:

If these samples are important, does this system have an “important” display device or do you access it remotely?

If display is important, do you want it hosted by the NVIDIA GPU or by some other device?

Honestly, I’m not sure your google skills are serving you well here. There is a lot of information on the web that covers display management in an X/linux environment. I may not have the time to personally walk you thru each step in the process, so if I stop responding, that is likely the case.

Thank you for your reply. I apologize if my relative inexperience with Linux was an imposition.