编译OpenGL代码时发生 Inconsistency detected by ld.so: dl-version.c: 224: _dl_check_map_versions: Assertion `needed != ((void *)0)' failed! 错误的解决方案
注:本解决方案适用于使用N卡的PC
出现该错误 , 一般是由于开源的nouveau驱动和Nvidia专有驱动冲突导致的 。在解决该问题时 , 尝试过卸载 N 卡专有驱动 , 仅使用开源nouveau驱动 ,
这样做以后这个错误是没有了, 但是OpenGL代码执行起来以后出现了各种问题 , 对 shader 支持也不好 , 使用的时候会提示 仅支持低版本的 GLSL , 通过
调用 glutInitContextVersion 指定了 OpenGL 版本后 错误提示没有了 , 但是程序还是不能正常工作 。 最后选择卸载 nouveau , 转而使用 N 卡 专有驱动 。
卸载 nouveau 驱动的 步骤如下:
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.
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.
For our little endeavour, here is what we are going to do.
We'll blacklist all the culprit modules,
remove all the nvidia* packages and
as an extra step we may have to update the initramfs disk because it could be configured to load the modules at startup.
1) Blacklist the modules. Open the blacklist.conf file.
[shredder12]$ sudo vim /etc/modprobe.d/blacklist.conf
add the following modules in the file.
blacklist amd76x_edac #this might not be required for x86 32 bit users.
blacklist vga16fb
blacklist nouveau
blacklist rivafb
blacklist nvidiafb
blacklist rivatv
Save the file and exit.
2) Remove all the nvidia* packages
[shredder12]$ sudo apt-get remove --purge nvidia*
3) Once you are done with the steps above, reboot, stop the display manager and try to install nvidia drivers.
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.
To stop the display manager use the following command
[shredder12]$ sudo /etc/init.d/gdm stop
gdm is for gnome display manager. If you are using kde then use “kdm”.
Now, run the driver package that you downloaded from Nvidia’s website.
[shredder12]$ sudo ./NVIDIA-Linux-x86-260.19.44.run
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.
[shredder12]$ sudo update-initramfs -u
Now reboot and repeat the step 3. This time things should go smoothly.
换上了专有驱动后 , 在 编译选项中 指定 -L/usr/lib/nvidia-xxx/ , 让链接器链接专有驱动提供的OpenGL库 , 问题解决 。
编译OpenGL代码时发生 Inconsistency detected by ld.so: dl-version.c: 224: _dl_check_map_versions: Assertion `needed != ((void *)0)' failed! 错误的解决方案的更多相关文章
- Flash调用Alchemy编译的代码时出现Error #1506的解决
Flash调用Alchemy编译的代码时出现Error #1506的解决这个问题困扰了我很久,因为需要频繁的向Alchemy代码中传递大ByteArray数组.当某次传递的数据量较大时,后面再调用时就 ...
- 编译Cython代码时遇到的问题: fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'
使用python setup.py build_ext --inplace命令编译cython代码, 出现以下错误: Compiling cython_example.pyx because it c ...
- Ubuntu Linux14 64位下在Android studio下用gradle编译Andrid项目时发生libz.so.1共享库找不到的解决方法。
---恢复内容开始--- 我在Ubuntu14 64为下安装了AS,但在用Gradle编译项目时总是报找不到 libz.so.1的错误. error while loading shared libr ...
- 在Linux下使用gcc编译mesa文件报undefined reference to symbol 'sin@@GLIBC_2.2.5和DSO missing from command line两个错误的解决方案
一.概述 在Linux系统下使用gcc编译用C语言写的mesa的示例程序. 环境:Ubuntu Server 18.04.1 二.问题的出现 在Ubuntu下安装好mesa所需的库文件,将目标文件从g ...
- 创建或打开解决方案时提示"DotNetCore.1.0.1-SDK.1.0.0.Preview2-003131-x86"错误的解决方案
提示"DotNetCore.1.0.1-SDK.1.0.0.Preview2-003131-x86"错误的解决方案: 1.检查是否有C:\Program Files (x86)\d ...
- GCC编译C代码
C程序的编译过程 常用文件的后缀名: gcc编译c代码 1.gcc 常用编译选项: 2.gcc编译方法 testc.c: #include <stdio.h> int main ...
- 升级到JDK8,编译时发生 Error:java: java.lang.ExceptionInInitializerError
编译的时候出现这个问题.使用1.7的jdk没问题,但是由于po主的项目中,使用了java8编写的代码,解决java8兼容问题成为解决这个问题的首选方案. 这个日志太过简单,只告知一个异常信息,这个异常 ...
- 编译opengl编程指南第八版示例代码通过
最近在编译opengl编程指南第八版的示例代码,如下 #include <iostream> #include "vgl.h" #include "LoadS ...
- 滑动RecyclerView时出现异常: java.lang.IndexOutOfBoundsException: Inconsistency detected. Invalid item position 6(offset:6).state:30
RecyclerView 存在的一个明显的 bug 一直没有修复: java.lang.IndexOutOfBoundsException: Inconsistency detected. Inval ...
随机推荐
- linux-c/c++调试利器gdb、ddd小试
linux-c/c++调试利器gdb.ddd小试 原文链接: http://deepfuture.iteye.com/blog/749148 博客分类: C++/C/lisp CC++C#LinuxU ...
- 在eclipse中生成实体类
1.在eclipse的windows中选中preferences在查询框中输入driver definition 2.点击add在Name/type中选中mysql jdbc driver 5.1然后 ...
- notepad++正则表达式替换字符串详解
正则表达式是一个查询的字符串,它包含一般的字符和一些特殊的字符,特殊字符可以扩展查找字符串的能力,正则表达式在查找和替换字符串的作用不可忽视,它 能很好提高工作效率. EditPlus的查找,替换,文 ...
- 自定义GridLayout实现条目的拖动动画特效
1.自定义GridLayout实现增加条目过度动画操作 public class MyGridLayout extends GridLayout { public MyGridLayout(Conte ...
- 《JavaScript高级程序设计》读书笔记 ---创建对象
虽然Object 构造函数或对象字面量都可以用来创建单个对象,但这些方式有个明显的缺点:使用同一个接口创建很多对象,会产生大量的重复代码.为解决这个问题,人们开始使用工厂模式的一种变体. 工厂模式工厂 ...
- Strusts2--课程笔记8
文件的和上传和下载: (1)文件的上传: Struts是通过拦截器实现文件上传的,而默认拦截器栈中包含了文件上传拦截器,故表单通过Struts2可直接将文件上传,其底层是通过apache的common ...
- Android 边框圆角
RelativeLayout 圆角实现: drawable目录下面定义shape的xml文件: mall_header_rel_bg.xml <?xml version="1.0&q ...
- 未知的生成错误 因为没有预加载,所以无法解析程序集 GalaSoft.MvvmLight
使用wpf开发时,在ViewModel中引用了DevExpress注册的GalaSoft.MvvmLight命名空间,使用其ViewModelBase,在View界面中绑定事件时出现错误: 错误 13 ...
- Maven-项目构建技术(工具)
Maven-项目构建技术(工具) 主要的内容目标:如何创建项目.如何导入jar.如何进行其他配置.如何管理生命周期 今天的主要安排: maven的概述(为什么要用?是什么) 快速入门(配置.名词解释. ...
- HDU 1331 Function Run Fun(记忆化搜索)
Problem Description We all love recursion! Don't we? Consider a three-parameter recursive function w ...