当前位置:   article > 正文

编译OpenGL代码时发生 Inconsistency detected by ld.so: dl-version.c: 224: _dl_check_map_versions: Assertion...

inconsistency detected by ld.so: dl-version.c: 224: _dl_check_map_versions:

注:本解决方案适用于使用N卡的PC

 

      出现该错误 , 一般是由于开源的nouveau驱动和Nvidia专有驱动冲突导致的 。在解决该问题时 , 尝试过卸载 N 卡专有驱动 , 仅使用开源nouveau驱动 , 

这样做以后这个错误是没有了, 但是OpenGL代码执行起来以后出现了各种问题 , 对 shader 支持也不好 , 使用的时候会提示 仅支持低版本的 GLSL , 通过

调用 glutInitContextVersion 指定了 OpenGL 版本后 错误提示没有了 , 但是程序还是不能正常工作 。 最后选择卸载 nouveau , 转而使用 N 卡 专有驱动 。

 

  卸载 nouveau 驱动的 步骤如下:

    

  1. Before starting, you might want to know that nouveau is a project which aims to develop open source drivers for Nvidia cards. When you install Ubuntu, it detects your card and installs these drivers.
  2. Please note that, nouveau drivers manual removal is required only if you are going to install the propreitary nvidia drivers yourself. If this is not the case then directly install the required graphic drivers from System->Administration->Hardware drivers. Its the recommended and the most convenient way available.
  3. For our little endeavour, here is what we are going to do.
  4. We'll blacklist all the culprit modules,
  5. remove all the nvidia* packages and
  6. as an extra step we may have to update the initramfs disk because it could be configured to load the modules at startup.
  7. 1) Blacklist the modules. Open the blacklist.conf file.
  8. [shredder12]$ sudo vim /etc/modprobe.d/blacklist.conf
  9. add the following modules in the file.
  10. blacklist amd76x_edac #this might not be required for x86 32 bit users.
  11. blacklist vga16fb
  12. blacklist nouveau
  13. blacklist rivafb
  14. blacklist nvidiafb
  15. blacklist rivatv
  16. Save the file and exit.
  17. 2) Remove all the nvidia* packages
  18. [shredder12]$ sudo apt-get remove --purge nvidia*
  19. 3) Once you are done with the steps above, reboot, stop the display manager and try to install nvidia drivers.
  20. Press Ctrl-Alt-F1. Once you are in the text mode, stop the display manager. This will end all the applications, so you better close them yourself before completing this step.
  21. To stop the display manager use the following command
  22. [shredder12]$ sudo /etc/init.d/gdm stop
  23. gdm is for gnome display manager. If you are using kde then use “kdm”.
  24. Now, run the driver package that you downloaded from Nvidia’s website.
  25. [shredder12]$ sudo ./NVIDIA-Linux-x86-260.19.44.run
  26. 4) If you still get the error related to nouveau drivers then you are probably required to update the initramfs disk. Probably it might be configured to load the nouveau drivers. Don't reboot or poweroff, run this command to update the initramfs disk.
  27. [shredder12]$ sudo update-initramfs -u
  28. Now reboot and repeat the step 3. This time things should go smoothly.

 

   换上了专有驱动后 , 在 编译选项中 指定 -L/usr/lib/nvidia-xxx/ , 让链接器链接专有驱动提供的OpenGL库 , 问题解决 。

 

转载于:https://www.cnblogs.com/wowk/p/4350520.html

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Monodyee/article/detail/325851
推荐阅读
相关标签
  

闽ICP备14008679号