Ubuntu有线没法上网(modprobe: ERROR: could not insert 'r8168':Required key not available)

本文主要是介绍Ubuntu有线没法上网(modprobe: ERROR: could not insert 'r8168':Required key not available),希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

  1. ubuntu有线无法上网,使用ifconfig没看到有线网卡,证明没有驱动
sudo lshw -C network显示: 
*-network UNCLAIMED description: Ethernet controllerproduct:RTL8111/8168/8411 PCI Express Gigabit Ethernet Controllervendor: Realtek Semiconductor Co., Ltd.

*-network UNCLAIMED 即表示没有驱动。

  1. 去Realtek官网http://www.realtek.com/search/default.aspx?keyword=RTL8111 拉到下面,找到下载链接,找到linux对应的版本。

      GBE Ethernet LINUX driver r8168 for kernel up to 4.15	8.048.00	2020/01/08	107 KB
    

在这里插入图片描述
解压并运行:sudo bash autorun.sh

注意:这里可能会报两个error,如果没有跳过第三步。
出现此问题的原因是,Ubuntu Kernel 使用 EFI_SECURE_BOOT_SIG_ENFORCE 内核配置,这样会阻止内核载入第三方模块。

Check old driver and unload it.
Build the module and install
At main.c:222:
- SSL error:02001002:systemlibrary:fopen:No such file or directory: bss_file.c:175
- SSL error:2006D080:BIO routines:BIO_new_file:no suchfile: bss_file.c:178
sign-file: certs/signing_key.pem: No such file ordirectory
DEPMOD 4.4.0-31-generic
load module r8168
modprobe: ERROR: could not insert 'r8168':Required key not available
Updating initramfs. Please wait.
update-initramfs: Generating/boot/initrd.img-4.4.0-31-generic
Completed.

解决方法如下:

  1. 在终端执行如下指令:
sudo apt install mokutil
sudo mokutil --disable-validation

执行后,终端会让你设置8-16位密码(之后要用,不要忘记哦~)
接下来,重启电脑,会出现蓝屏(不要紧张,按下任意键进入选择界面 :-)),选项如下:

  • Continue boot
  • Change Secure Boot state
  • Enroll key from disk
  • Enroll hash from disk
    选择Change Secure Boot state,接下来会让你输入之前的密码。
    我的系统很调皮,没有让我直接输入密码,而是要求 Enter password character 7,意思是输入密码的第7位(这点要注意!)。
    接下来进入Disable Secure Boot选择界面,选择 yes(不要直接按下Enter,这样就前功尽弃,只能从头再来了!)。
    然后下个界面又回到最开始的界面,选择reboot,重新进入系统,
    重新安装:sudo bash autorun.sh
  1. 完成之后,检查是否安装成功
    lsmod|grep r8168
    [matt@localhost r8168-8.042.00]$ lsmod|grep r8168
    r8168 491520 0
  2. 查看网卡状态
sudo lshw -C network
显示: *-network DISABLEDdescription: Ethernet interfaceproduct: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controllervendor: Realtek Semiconductor Co., Ltd.physical id: 0bus info: pci@0000:09:00.0logical name: enp9s0
  1. 启动网卡:(注意 logical name
sudo ifconfig enp9s0 up

自动获得Ip:

sudo dhclient enp9s0 

后续自动启动有线网卡的,本人还未用折腾,先用着吧。
其中主要折腾在于一直安装不上网卡。
目前开机直接输入步骤6就行了。

这篇关于Ubuntu有线没法上网(modprobe: ERROR: could not insert 'r8168':Required key not available)的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/335707

相关文章

pico2 开发环境搭建-基于ubuntu

pico2 开发环境搭建-基于ubuntu 安装编译工具链下载sdk 和example编译example 安装编译工具链 sudo apt install cmake gcc-arm-none-eabi libnewlib-arm-none-eabi libstdc++-arm-none-eabi-newlib 注意cmake的版本,需要在3.17 以上 下载sdk 和ex

git ssh key相关

step1、进入.ssh文件夹   (windows下 下载git客户端)   cd ~/.ssh(windows mkdir ~/.ssh) step2、配置name和email git config --global user.name "你的名称"git config --global user.email "你的邮箱" step3、生成key ssh-keygen

DBeaver 连接 MySQL 报错 Public Key Retrieval is not allowed

DBeaver 连接 MySQL 报错 Public Key Retrieval is not allowed 文章目录 DBeaver 连接 MySQL 报错 Public Key Retrieval is not allowed问题解决办法 问题 使用 DBeaver 连接 MySQL 数据库的时候, 一直报错下面的错误 Public Key Retrieval is

Caused by: org.hibernate.MappingException: Could not determine type for: org.cgh.ssh.pojo.GoodsType,

MappingException:这个主要是类映射上的异常,Could not determine type for: org.cgh.ssh.pojo.GoodsType,这句话表示GoodsType这个类没有被映射到

在Ubuntu 20.04上安装Nginx的方法

前些天发现了一个巨牛的人工智能学习网站,通俗易懂,风趣幽默,忍不住分享一下给大家。点击跳转到网站。 简介 Nginx 是世界上最流行的 Web 服务器之一,负责托管互联网上一些最大和流量最高的网站。它是一个轻量级选择,可以用作 Web 服务器或反向代理。 在本指南中,我们将讨论如何在 Ubuntu 20.04 服务器上安装 Nginx,调整防火墙,管理 Nginx 进程,并设置服务器块以从单

虚拟机ubuntu配置opencv和opencv_contrib

前期准备  1.下载opencv和opencv_contrib源码 opencv-4.6.0:https://opencv.org/releases/ opencv_contrib-4.6.0:https://github.com/opencv/opencv_contrib 在ubuntu直接下载或者在window上下好传到虚拟机里都可以 自己找个地方把他们解压,个人习惯在home下新建一

编译linux内核出现 arm-eabi-gcc: error: : No such file or directory

external/e2fsprogs/lib/ext2fs/tdb.c:673:29: warning: comparison between : In function 'max2165_set_params': -。。。。。。。。。。。。。。。。。。 。。。。。。。。。。。。。 。。。。。。。。 host asm: libdvm <= dalvik/vm/mterp/out/Inte

解决ubuntu系统无法与FinalShell无法连接问题

问题 解决方案 先下载ubuntu网络工具 sudo apt install net-tools 输入密码 下载完成后进入管理员模式查看密码 sudo -i hostname -I 查看IP 得到ip地址后再继续安装 openssh-server 插件 sudo apt-get install openssh-server 问题解决 尝试连接Fina

收藏:解决 pip install 出现 error: subprocess-exited-with-error 错误的方法

在使用 pip 安装 Python 包时,有时候会遇到 error: subprocess-exited-with-error 错误。这种错误通常是由于 setuptools 版本问题引起的。本文将介绍如何解决这一问题 当你使用 pip install 安装某个 Python 包时,如果 setuptools 版本过高或过低,可能会导致安装过程出错,并出现类似以下错误信息:error: subpr

hector_quadrotor编译总结 | ubuntu 16.04 ros-kinetic版本

hector_quadrotor编译总结 | ubuntu 16.04 ros-kinetic版本 基于Ubuntu 16.04 LTS系统所用ROS版本为 Kinetic hector_quadrotor ROS包主要用于四旋翼无人机的建模、控制和仿真。 1.安装依赖库 所需系统及依赖库 Ubuntu 16.04|ros-kinetic|Gazebo|gazebo_ros_pkgs|ge