无法加载动态库 /usr/lib/OGRE/RenderSystem_GL
·
问题:无法加载动态库 /usr/lib/OGRE/RenderSystem_GL
我正在尝试在 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
我已经安装了 Ogre 库,但这个问题仍然存在。关于我需要安装哪个软件包以消除此错误的任何帮助?我正在使用 Ubuntu 14.04。
解答
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/
更多推荐
所有评论(0)