编译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 ...
随机推荐
- 《HTML5与CSS3权威指南》读书笔记(上册)—HTML5篇
豆瓣上的评分少且评价不太好,阅读当中发现几处刊物上的小问题,不过线下口碑貌似不错,基本上人手一本 上册五百多页,主讲H5,分为标签,本地存储,离线应用程序,新的API,获取地理位置信息标签包含表单,C ...
- JavaScript-Curry
Currying allows you to easily create custom functions by partially invoking an existing function. He ...
- 【Python之路】第七篇--Python基础之面向对象及相关
面向对象基础 基础内容介绍详见一下两篇博文: 面向对象初级篇 面向对象进阶篇 其他相关 一.isinstance(obj, cls) 检查obj是否是类 cls 的对象 class Foo(objec ...
- HDU 5862 Counting Intersections(离散化+树状数组)
HDU 5862 Counting Intersections(离散化+树状数组) 题目链接http://acm.split.hdu.edu.cn/showproblem.php?pid=5862 D ...
- cocos2d-js引擎学习笔记
cocos2d-js3.0实用语法 /*初始化继承类*/ var Enemy = cc.Sprite.extend({ hp: 0, fileName: "enemy.png", ...
- 使用SQL Server视图的优缺点
SQL Server视图我们经常会用的到,下面就为您介绍使用SQL Server视图的优缺点,希望可以对您SQL Server视图有更多的了解. 在程序设计的时候必须先了解视图的优缺点,这样可以扬长避 ...
- PHP操作Memcache基本函数
Memcache模块提供了于Memcached方便的面向过程及面向对象的接口,Memcached是为了降低动态web应用从数据库加载数据而产生的一种常驻进程缓存产品.Memcache模块同时提供了一个 ...
- python获取
def anc():pass print anc.__name__ def timeit(func): def run(*argv): print "this function name i ...
- 浅谈position: absolute和position:relative
一.在此先说一下文档流的概念: 1,文档流定义: 百度百科定义:文档流是文档中可显示对象在排列时所占用的位置. 大多网友的理解:元素的位置由元素在 (X)HTML 中的位置决定.将窗体自上而下分成一行 ...
- Java AOP - Aspectj
1. 序 Aspect Oriented Programming (AOP)是近来一个比较热门的话题. AspectJ是AOP的Java语言的实现,获得了Java程序员的广泛关注. 关于AspectJ ...