安装NVIDIA驱动的一些新问题

 

 

又一次安装NVIDIA驱动程序,这一次,不向以前一二三四五.......次很顺的安装成功。这一次网上的所有方法都试了遍,都木有成功。

报错:

ERROR: Failed to run `/usr/sbin/dkms build -m nvidia -v 418.43 -k 4.15.0-50-generic`:
         Kernel preparation unnecessary for this kernel.  Skipping...

         Building module:
         cleaning build area....
         'make' -j4 NV_EXCLUDE_BUILD_MODULES='' KERNEL_UNAME=4.15.0-50-generic IGNORE_CC_MISMATCH=''
         modules....(bad exit status: 2)
         ERROR (dkms apport): binary package for nvidia: 418.43 not found
         Error! Bad return status for module build on kernel: 4.15.0-50-generic (x86_64)
         Consult /var/lib/dkms/nvidia/418.43/build/make.log for more information.
ERROR: Failed to install the kernel module through DKMS. No kernel module was installed; please try
         installing again without DKMS, or check the DKMS logs for more information.
ERROR: Installation has failed.  Please see the file '/var/log/nvidia-installer.log' for details.
         You may find suggestions on fixing installation problems in the README available on the Linux
         driver download page at www.nvidia.com.

按照提示打开  /var/lib/dkms/nvidia/418.43/build/make.log文档

文档中内容:

make[1]: Entering directory '/usr/src/linux-headers-4.15.0-50-generic'
arch/x86/Makefile:245: *** You are building kernel with non-retpoline compiler, please update your compiler..  Stop.
make[1]: Leaving directory '/usr/src/linux-headers-4.15.0-50-generic'
Makefile:79: recipe for target 'modules' failed
make: *** [modules] Error 2
输入:
uname -r #查看内核版本是4.15.0-50

然后卸载这个版本的内核

apt-get remove linux-image-4.15.0-50-generic

但是又出现了一个错误

E: Aborting removal of the running kernel
dpkg: error processing package linux-image-4.15.0-50-generic (--remove):
 subprocess installed pre-removal script returned error exit status 1
Errors were encountered while processing:
 linux-image-4.15.0-50-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)

最后解决了半天,机子没法上网,没法进入图形化界面,最后暴力解决,重新装了系统。

思考了半天,发现一个问题,只要内核版本不是4.15.0-50-generic,就可以正常装驱动,也不会报各种奇怪的错误了。

所以,建议大家,少用sudo apt-get update和sudo apt-get upgrade两个命令。

参考:

http://www.mamicode.com/info-detail-2682975.html

https://www.cnblogs.com/luofeel/p/8654964.html

https://blog.csdn.net/qq_42030961/article/details/82740315

  • 2
    点赞
  • 16
    收藏
    觉得还不错? 一键收藏
  • 5
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值