无法加载动态库/ usr / lib / OGRE / RenderSystem_GL

Muh*_*mer 4 c++ ubuntu ogre

我试图在C ++中运行程序,但出现此错误:

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
Run Code Online (Sandbox Code Playgroud)

我已经安装了Ogre库,但是此问题仍然存在。我需要安装哪个软件包的任何帮助才能消除此错误?我正在使用Ubuntu 14.04。

Ste*_*ppo 5

Ubuntu随附的OGRE库安装在/usr/lib/x86_64-linux-gnu/OGRE-1.9.0/(或-1.8.0)中,而不是中/usr/lib/OGRE/

您的程序正在尝试dlopen使用绝对路径或类似路径。如果您无法修改程序以使其使用新路径(或者更好的是,它使链接程序确定要使用的路径),则最简单的解决方案是使用以下方法创建符号链接:

sudo ln -s /usr/lib/x86_64-linux-gnu/OGRE-1.9.0/ /usr/lib/OGRE/
Run Code Online (Sandbox Code Playgroud)