4

I am trying to run a program in C++ but I am getting this error:

terminate called after throwing an instance of 'Ogre::InternalErrorException' what():  OGRE EXCEPTION(7:InternalErrorException): Could not load dynamic library /usr/lib/OGRE/RenderSystem_GL.  System Error: /usr/lib/OGRE/RenderSystem_GL.so: cannot open shared object file: No such file or directory

I have installed the Ogre libraries but this problem still persists. Any help on which package do I need to install to get rid of this error? I am using Ubuntu 14.04.

Muhammad Omer
  • 543
  • 1
  • 8
  • 15

2 Answers2

8

OGRE libraries shipped by Ubuntu are installed in /usr/lib/x86_64-linux-gnu/OGRE-1.9.0/ (or -1.8.0), not in /usr/lib/OGRE/.

Your program is attempting a dlopen or similar with an absolute path. If you cannot modify the program so that it uses the new path (or, better, it lets the linker decide what path to use), the easiest solution is creating a symlink with:

sudo ln -s /usr/lib/x86_64-linux-gnu/OGRE-1.9.0/ /usr/lib/OGRE/
Stefano Sanfilippo
  • 32,265
  • 7
  • 79
  • 80
1

Try ldd YOUR_BINARY to see if it can find the dynamic linking libs it requires.