CUDA is missing libGL.so libGLU.so and libX11.so

This is a standard problem that people face, but I cannot get it to work. I am on Linux Mint 17.3 and did the installation via repo. When I try to compile the 5_Simulations directory (actually, fluidsGL), I get the following errors:

>>> WARNING - libGL.so not found, refer to CUDA Getting Started Guide for how to find and install them. <<< >>> WARNING - libGLU.so not found, refer to CUDA Getting Started Guide for how to find and install them. <<< >>> WARNING - libX11.so not found, refer to CUDA Getting Started Guide for how to find and install them. <<< 

However, they exist in the system, for example:

 [ name@host : fluidsGL]$ locate libGL.so /usr/lib/i386-linux-gnu/mesa/libGL.so.1 /usr/lib/i386-linux-gnu/mesa/libGL.so.1.2.0 /usr/lib/nvidia-352/libGL.so /usr/lib/nvidia-352/libGL.so.1 /usr/lib/nvidia-352/libGL.so.352.68 /usr/lib/x86_64-linux-gnu/libGL.so /usr/lib/x86_64-linux-gnu/mesa/libGL.so /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1 /usr/lib/x86_64-linux-gnu/mesa/libGL.so.1.2.0 /usr/lib32/nvidia-352/libGL.so /usr/lib32/nvidia-352/libGL.so.1 /usr/lib32/nvidia-352/libGL.so.352.6 

Even the symlink to /usr/lib/libGL.so with nvidia-352 does not work. Has anyone had this particular problem? I try not to spoil the computer, because I had problems with drivers that suddenly do not work when I start messing around with such things.

+5
source share
2 answers

Linux Mint is not an officially supported distribution for CUDA . Thus, it is possible that the CUDA installation method (in this case, part of the driver installation) places the necessary GL libraries in a place inaccessible to the makefile.

If you examine the "helper" findgllib.mk makefile in the build directory, I suspect that the debian-based distribution will follow the UBUNTU path in this .mk file. For non-ppc and non-arm branches, you will find the following definitions:

 ifeq ("$(UBUNTU)","0") ifeq ... ... else GLPATH ?= /usr/lib/$(UBUNTU_PKG_NAME) GLLINK ?= -L/usr/lib/$(UBUNTU_PKG_NAME) DFLT_PATH ?= /usr/lib 

Given that:

  • You stated that GL libraries seem to have been installed.
  • You have highlighted these libraries in the / usr / lib directory
  • The GLPATH definition in a .mk file is a "no override" definition (ie ?= )

we can "override" or replace the GLPATH definition created by the makefile with the "known good" from /usr/lib with:

 GLPATH=/usr/lib 

added to your make .

+9
source

I have the same problem, and I tried everything, including installing the driver, but when I looked at makefile (.mk), the indicated version of the graphics driver was checked for the name of the OS distribution (Ubuntu, fedora, etc.) when I used Zorin so that he could not find the path to the variables. therefore, after changes in the mines, it works successfully. I hope this helps.

The changes were:

// any version of u has

 UBUNTU_PKG_NAME = "nvidia-375" 

// add the distribution name to this list

  ifeq (,$(filter $(DISTRO),ubuntu zorin fedora red rhel centos suse)) DISTRO = endif 

// add this line for a specific distribution

 ZORIN = $(shell echo $(DISTRO) | grep -i zorin >/dev/null 2>&1; echo $$?) 

// copy and paste the same code that ubuntu has in the file for your specified distribution, if required

 ifeq ("$(ZORIN)","0") ifeq ($(HOST_ARCH)-$(TARGET_ARCH),x86_64-armv7l) GLPATH := /usr/arm-linux-gnueabihf/lib GLLINK := -L/usr/arm-linux-gnueabihf/lib ifneq ($(TARGET_FS),) GLPATH += $(TARGET_FS)/usr/lib/$(UBUNTU_PKG_NAME) GLPATH += $(TARGET_FS)/usr/lib/arm-linux-gnueabihf GLLINK += -L$(TARGET_FS)/usr/lib/$(UBUNTU_PKG_NAME) GLLINK += -L$(TARGET_FS)/usr/lib/arm-linux-gnueabihf endif else ifeq ($(HOST_ARCH)-$(TARGET_ARCH),x86_64-ppc64le) GLPATH := /usr/powerpc64le-linux-gnu/lib GLLINK := -L/usr/powerpc64le-linux-gnu/lib else GLPATH ?= /usr/lib/$(UBUNTU_PKG_NAME) GLLINK ?= -L/usr/lib/$(UBUNTU_PKG_NAME) DFLT_PATH ?= /usr/lib endif endif 
0
source

Source: https://habr.com/ru/post/1239917/


All Articles