A record for installing NVIDIA driver on Ubuntu 18.04

        There's something wrong with my system that I can only type English right now. In order not to forget what I've suffered, I use English this time.

          In order to install tensorflow with GPU, fist I've got to install NVIDIA driver for my GTX1050. I used Kylin before, but this operation system was not mature and caused me great trouble. So I decide to turn to the original ubuntu18.04.

         Follow "https://linuxconfig.org/how-to-install-the-nvidia-drivers-on-ubuntu-18-04-bionic-beaver-linux", I promote my solution here.

          First, NVIDIA driver is a third-party driver for Ubuntu. So in order to install correctly, we have to disable the secure boot first. The concrete steps of this can be googled online.

           Second, use

sudo ubuntu-drivers autoinstall

           If you don't have the tool, just download one. If you find your processing is stuck, don't worry. It's a bug, asking for a password but failing to display. Just type your password for 3 or 4 times, and the procedure will go on. Thanks to https://devtalk.nvidia.com/default/topic/1036167/stuck-trying-to-intall-nvidia-390-ubuntu-18-04-lts-/

           But unluckily, I typed the wrong password, and the terminal was locked. I forced to shut the terminal and restart the installation,  but found the dpkg was locked. Don't worry. Follow the steps.  Thanks for https://www.reddit.com/r/Ubuntu/comments/8r3zov/stuck_at_building_initial_module/

          First, download the modules according to your system manually using google . For example, I need to download  linux-modules-4.15.0-23-generic_4.15.0-23.25_amd64.deb. And then use dpkg to install. Lucily, this is not locked. Then everything went on well.

           Then, I realized that there's  another tool. It's a Ubuntu plugin and originally exists in the system called "software and update". There's one option just help me to install a third party driver. So I purged the existence file of NVIDIA  using

"sudo apt-get purge nvidia*)

          But don't auto-remove. We need the required files. Then use the system tool. When asking for a secure boot and enrolling a new Machine-Owner Key, just choose No. Then reboot the computer.

            Open one terminal. Use the order "nvidia-smi" to check.

           Everything is done! Thank God!


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值