下载官网的最新Linux内核版本,Linux虚拟机中Ubuntu 下载速度慢,更换镜像源后使下载速度正常。这是一个.tar.xz文件,我们要先来解压它。下面是下载内核解压文件编译内核配置内核的全过程。由于我们并没有正确的写好相关配置文件,我们的内核编译是失败的。
First,we would like to download the latest Linux kernel from Linux website .It seems that we could choose some old versions with smaller size but we prefer to using the latest one firstly.
xz -d linux-5.7.tar.xz
tar -xvf linux-5.7.tar
After decompressing the file, we would like to explore it.
cd linux-5.7/
ls
Here we have met a problem after entering make menuconfig
in the terminal .We can not open the Linux kernel configuration window.
(base) warmtree@warmtree-HP-Pavilion-Laptop-15-cc5xx:~/下载/linux-5.7$ make menuconfig
HOSTCC scripts/basic/fixdep
UPD scripts/kconfig/mconf-cfg
HOSTCC scripts/kconfig/mconf.o
HOSTCC scripts/kconfig/lxdialog/checklist.o
HOSTCC scripts/kconfig/lxdialog/inputbox.o
HOSTCC scripts/kconfig/lxdialog/menubox.o
HOSTCC scripts/kconfig/lxdialog/textbox.o
HOSTCC scripts/kconfig/lxdialog/util.o
HOSTCC scripts/kconfig/lxdialog/yesno.o
HOSTCC scripts/kconfig/confdata.o
HOSTCC scripts/kconfig/expr.o
LEX scripts/kconfig/lexer.lex.c
/bin/sh: 1: flex: not found
scripts/Makefile.host:9: recipe for target 'scripts/kconfig/lexer.lex.c' failed
make[1]: *** [scripts/kconfig/lexer.lex.c] Error 127
Makefile:588: recipe for target 'menuconfig' failed
make: *** [menuconfig] Error 2
We should compile successfully before configuring.