linking OpenGL Libraries

Posted June 11, 2019 3.1k views
DigitalOceanPythonDokkuApplicationsUbuntu 18.04

I’ve got a dokku droplet that uses OpenGL (via python’s PyOpenGL / pyqt5 & vispy) to create an image. Normally, OpenGL requires a GPU, but I think I’ve successfully compiled the library using mesa for CPU usage.

The issue is my program (deployed via dokku) cannot seem to find the library I created. I compiled the library using the console and put the library in /usr/lib .

But when I try LD_PRELOAD=/usr/lib/, I get

LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.

and then: cannot open shared object file: No such file or directory

which crashes the program.

Is there a place I need to put libraries where dokku can see them?

1 comment

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer


As a test, I would suggest trying to install the libGL with apt rather than comping it manually:

sudo apt update
sudo apt install libgl1-mesa-glx