RTX4060安装nvidia显卡驱动

文章目录

  • nvidia drivers下载
  • 删除原有nvidia驱动
  • 安装nvidia驱动
  • 如果报错Unable to find the kernel source tree for the currently running
  • building kernel modules
    • 解决方法
  • 报错
  • 成功安装!!!

nvidia drivers下载

https://www.nvidia.cn/geforce/drivers/#:~:text=NVIDIA%20GeF

参考如下视频下载匹配的显卡和安装:
NVIDIA显卡的Ubuntu驱动程序安装方法

删除原有nvidia驱动

如果是apt-get方法安装的驱动

sudo apt-get remove nvidia-*

如果这样卸载不干净则:

sudo apt autoremove -y nvidia* --purge
sudo rm /etc/apt/sources.list.d/cuda*
sudo apt-get autoremove && sudo apt-get autoclean
sudo rm -rf /usr/local/cuda*

如果是run方法安装的驱动

sudo sh NVIDIA-Linux-x86_64-550.120.run -uninstall

在这里插入图片描述

怎样干净的卸载以前装的nvidia驱动?

安装nvidia驱动

chmod +x NVIDIA-Linux-x86_64-550.120.run
sudo bash  NVIDIA-Linux-x86_64-550.120.run

当没有报错,或者

如果报错Unable to find the kernel source tree for the currently running

Unable to find the kernel source tree for the currently running
kernel. Please make sure you have installed the kernel source files
for your kernel and that they are properly configured; on Red Hat
Linux systems, for example, be sure you have the ‘kernel-source’ or
‘kernel-devel’ RPM installed. If you know the correct kernel source
files are installed, you may specify the kernel source path with the
‘–kernel-source-path’ command line option.

building kernel modules

ERROR: An error occurred while performing the step: “Building kernel
modules”. See /var/log/nvidia-installer.log for details.

查看之后发现:

warning: the compiler differs from the one used to build the kernel
The kernel was built by: x86_64-linux-gnu-gcc-12 (Ubuntu 12.2.0-3ubuntu1) 12.2.0
You are using: cc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0

x

86_64-linux-gnu-gcc-12 (Ubuntu 12.2.0-3ubuntu1) 12.2.0, GNU ld (GNU Binutils for Ubuntu) 2.39does not match the compiler used here:cc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0Copyright (C) 2021 Free Software Foundation, Inc.This is free software; see the source for copying conditions.  There is NOwarranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.It is recommended to set the CC environment variableto the compiler that was used to compile the kernel.To skip the test and silence this warning message, setthe IGNORE_CC_MISMATCH environment variable to "1".However, mixing compiler versions between the kerneland kernel modules can result in subtle bugs that aredifficult to diagnose.

解决方法

sudo apt-get install gcc-12 g+±12

安装gcc12

sudo apt-get install gcc-12 g++-12

切换系统中的GCC版本,后面的100是优先级

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 100
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 100

假如系统中的GCC和G++版本为11,则降低它们的优先级

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 90
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 90

将gcc g++都切换为12版本,命令如下:

sudo update-alternatives --config gcc
There are 2 choices for the alternative gcc (providing /usr/bin/gcc).Selection    Path             Priority   Status
------------------------------------------------------------
* 0            /usr/bin/gcc-12   100       auto mode1            /usr/bin/gcc-11   90        manual mode2            /usr/bin/gcc-12   100       manual modePress <enter> to keep the current choice[*], or type selection number: 2

报错

WARNING: Unable to determine the path to install the libglvnd EGL vendor
library config files. Check that you have pkg-config and the
libglvnd development libraries installed, or specify a path with
–glvnd-egl-config-path.

不用官,Ok即可,参考如下

Ubuntu安装NVIDIA驱动

成功安装!!!

在这里插入图片描述

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.xdnf.cn/news/1555430.html

如若内容造成侵权/违法违规/事实不符,请联系一条长河网进行投诉反馈,一经查实,立即删除!

相关文章

Python从入门到高手5.1节-Python简单数据类型

目录 5.1.1 理解数据类型 5.1.2 Python中的数据类型 5.1.3 Python简单数据类型 5.1.4 特殊的空类型 5.1.5 Python变量的类型 5.1.6 广州又开始变热 5.1.1 理解数据类型 数据类型是根据数据本身的性质和特征来对数据进行分类&#xff0c;例如奇数与偶数就是一种数据类型。…

去噪扩散模型

Denoising Diffusion Probabilistic Models 图像扩散模型是一种生成模型&#xff0c;它基于概率扩散过程来生成新的图像。 核心步骤包括&#xff1a;&#xff08;1&#xff09;前向扩散过程&#xff1b;&#xff08;2&#xff09;逆向扩散过程 前向扩散过程&#xff08;正向过…

No.4 笔记 | 探索网络安全:揭开Web世界的隐秘防线

在这个数字时代&#xff0c;网络安全无处不在。了解Web安全的基本知识&#xff0c;不仅能保护我们自己&#xff0c;也能帮助我们在技术上更进一步。让我们一起深入探索Web安全的世界&#xff0c;掌握那些必备的安全知识&#xff01; 1. 客户端与WEB应用安全 前端漏洞&#xff1…

Spring Boot框架下的大学生就业招聘平台

5系统详细实现 5.1 用户模块的实现 5.1.1 求职信息管理 大学生就业招聘系统的用户可以管理自己的求职信息&#xff0c;可以对自己的求职信息添加修改删除操作。具体界面的展示如图5.1所示。 图5.1 求职信息管理界面 5.1.2 首页 用户登录可以在首页看到招聘信息展示也一些求职…

STM32中断——外部中断

目录 一、概述 二、外部中断&#xff08;Extern Interrupt简称EXTI&#xff09; 三、实例-对射式红外传感器 1、配置中断&#xff1a; 2 、完整代码 一、概述 中断&#xff1a;在主程序运行过程中&#xff0c;出现了特定的中断触发条件(中断源)&#xff0c;使得CPU暂停当…

【图论】树剖(上):重链剖分

一、前置知识清单 深度优先搜索DFS 点我复习图的存储 复习链接敬请期待树状数组 点我复习 二、树剖简介 树剖&#xff08;树链剖分&#xff09;&#xff0c;是一种把树划分成链的算法&#xff0c;该算法分为重链剖分和长链剖分。 本文仅讨论重链剖分&#xff0c;长链剖分目前…

MySQL联合索引、索引下推Demo

1.联合索引 测试SQL语句如下&#xff1a;表test中共有4个字段(id, a, b, c)&#xff0c;id为主键 drop table test;#建表 create table test(id bigint primary key auto_increment,a int,b int,c int )#表中插入数据 insert into test(a, b, c) values(1,2,3),(2,3,4),(4,5,…

算法修炼之路之滑动窗口

目录 一&#xff1a;滑动窗口的认识及模板 二&#xff1a;LeetcodeOJ练习 1.第一题 2.第二题 3.第三题 4.第四题 5.第五题 6.第六题 7.第七题 一&#xff1a;滑动窗口的认识及模板 这里先通过一道题来引出滑动窗口 LeetCode 209 长度最小的子数组 画图分析&…

aws(学习笔记第一课) AWS CLI,创建ec2 server以及drawio进行aws画图

aws(学习笔记第一课) 使用AWS CLI 学习内容&#xff1a; 使用AWS CLI配置密钥对创建ec2 server使用drawio&#xff08;vscode插件&#xff09;进行AWS的画图 1. 使用AWS CLI 注册AWS账号 AWS是通用的云计算平台&#xff0c;可以提供ec2&#xff0c;vpc&#xff0c;SNS以及clo…

使用 Python 遍历文件夹

要解决这个问题&#xff0c;使用 Python 的标准库可以很好地完成。我们要做的是遍历目录树&#xff0c;找到所有的 text 文件&#xff0c;读取内容&#xff0c;处理空行和空格&#xff0c;并将处理后的内容合并到一个新的文件中。 整体思路&#xff1a; 遍历子目录&#xff1…

2.3MyBatis——插件机制

2.3MyBatis——插件机制 1.基本用法2.原理探究2.1加载过程2.2执行过程2.2.1 插件的执行点2.2.2 SQL执行的几个阶段2.2.3 如何梳理出执行流程 插件机制是一款优秀框架不可或缺的组成部分&#xff0c;比如spring、dubbo&#xff0c;还有我们要聊的Mybatis等等。所谓插件&#xff…

vSAN02:容错、存储策略、文件服务、快照与备份、iSCSI

目录 vSAN容错条带化存储策略1. 创建新策略2. 应用存储策略 vSAN文件服务文件服务快照与备份 vSAN iSCSI目标服务 vSAN容错 FTT&#xff1a;Fault to Tolerance 允许故障数 故障域&#xff1a;每一台vSAN主机是一个故障域 - 假设3台超融合&#xff08;3计算1存储&#xff09;&…

力扣 简单 110.平衡二叉树

文章目录 题目介绍解法 题目介绍 解法 平衡二叉树:任意节点的左子树和右子树的高度之差的绝对值不超过 1 //利用递归方法自顶向下判断以每个节点为根节点的左右子树的最大深度是否大于1 class Solution {public boolean isBalanced(TreeNode root) {if(root null){return tr…

基于Java的GeoTools对Shapefile文件属性信息深度解析

目录 前言 一、Shapefile的属性列表信息 1、属性表格信息 2、属性表格包含的要素 二、GeoTools对属性表格的解析 1、常规解析方法 2、基于dbf文件的属性信息读取 三、总结 前言 ESRI Shapefile&#xff08;shp&#xff09;&#xff0c;或简称shapefile&#xff0c;是美…

【Spring Boot React】Spring Boot和React教程 完整版

【Spring Boot & React】Spring Boot和React教程 在B站找到一个不错的SpringBoot和React的学习视频&#xff0c;作者是amigoscode 【Spring Boot & React】Spring Boot和React教程 2023年更新版【Spring Boot React】价值79.9美元&#xff0c;全栈开发&#xff0c;搭…

如何使用CMD命令启动应用程序(二)

说明&#xff1a;去年1024发布了一篇博客&#xff0c;介绍如何使用CMD命令启动应用程序&#xff0c;但实际情况&#xff0c;有些程序可能无法用配置环境变量的方式来启动&#xff0c;本文针对两种情况下的程序&#xff0c;如何使用CMD命令来启动&#xff0c;算是对上一篇博客的…

Qt操作主/从视图及XML——实例:汽车管理系统

目录 1. 主界面布局2.连接数据库3.主/从视图应用 1. 主界面布局 先创建一个QMainwindow&#xff0c;不带设计界面 #ifndef MAINWINDOW_H #define MAINWINDOW_H#include <QMainWindow> #include <QGroupBox> #include <QTableView> #include <QListWidg…

鸿蒙harmonyos next flutter混合开发之开发plugin(获取操作系统版本号)

创建Plugin为my_plugin flutter create --org com.example --templateplugin --platformsandroid,ios,ohos my_plugin 创建Application为my_application flutter create --org com.example my_application flutter_application引用flutter_plugin&#xff0c;在pubspec.yam…

如何解决 MySQL ERROR 1040 (08004): Too many connections ?

MySQL 是最流行的开源关系数据库管理系统之一&#xff0c;它也是开发人员中非常常用的数据库。即便它高度健壮和可伸缩性极强&#xff0c;像任何软件一样&#xff0c;它也可能出现错误。我们会经常遇到一个错误&#xff0c;特别是在高流量系统中&#xff0c;error 1040 (08004)…

51c视觉~CV~合集3

我自己的原文哦~ https://blog.51cto.com/whaosoft/11668984 一、 CV确定对象的方向 介绍如何使用OpenCV确定对象的方向(即旋转角度&#xff0c;以度为单位)。 先决条件 安装Python3.7或者更高版本。可以参考下文链接&#xff1a; https://automaticaddison.com/how-to-s…