zoukankan      html  css  js  c++  java
  • 升级 Linux 内核版本(编译源代码)

    升级内核版本(自己编译源码)

    1. 从 linux 官网 https://www.kernel.org/ 下载内核源码
    2. 解压

      tar -xvf linux-4.16.8.tar.xz
      cd linux-4.16.8/

    3. 编译(出现问题)

      make

      出现

      /bin/sh: 1: bison: not found
      scripts/Makefile.lib:217: recipe for target 'scripts/kconfig/zconf.tab.c' failed
      make[2]: *** [scripts/kconfig/zconf.tab.c] Error 127
      Makefile:514: recipe for target 'silentoldconfig' failed

      解决方法

      sudo apt-get install bison

      继续 make 又出现

      /bin/sh: 1: flex: not found
      scripts/Makefile.lib:202: recipe for target 'scripts/kconfig/zconf.lex.c' failed
      make[2]: *** [scripts/kconfig/zconf.lex.c] Error 127
      Makefile:514: recipe for target 'silentoldconfig' failed

      解决

      sudo apt-get install flex

      大概可以看出来,编译时缺少什么就安装什么

    4. 配置

      make menuconfig

      使用默认配置,save 后 exit

    5. 修复配置后编译 (4线程)

      make -j 4

    6. 安装内核模块

      sudo make modules_install

    7. 安装内核

      sudo make install

    关于VirtualBox 对 header 的依赖
    我在升级完内核版本后,把旧的linux启动项给删除了,header 应该也被我删除,然后启动vbox 失败,想起vbox需要有linux-header才能运行,然后安装header

    sudo apt-get install linux-headers-4.16.0-1-amd64

    安装完 header 后可以发现其存在 /usr/src 中,当然 vboxhost-5.2.1 也在里面,后面再启动vbox就没有问题了

  • 相关阅读:
    AE开发中Geometry到Polyline/Polygon的转换--转载
    asp.net MVC Views-----Controller传递数据方法
    百度翻译APi接口实现
    javascript添加删除行信息
    XMLDocument
    GDI绘制图像
    测试局域网内网络数据
    HL7 V2 分隔符
    IHE-PIX 备注
    数据库关键字 (Oracle, SQL Server, DB2)
  • 原文地址:https://www.cnblogs.com/shuqin/p/9450797.html
Copyright © 2011-2022 走看看