1)问题:
root@ubuntu:/usr/src/linux-source-5.4.0/linux-source-5.4.0# make oldconfig
YACC scripts/kconfig/parser.tab.[ch]
/bin/sh: 1: bison: not found
make[1]: *** [scripts/Makefile.host:17: scripts/kconfig/parser.tab.h] Error 127
make: *** [Makefile:594: oldconfig] Error 2
解决:apt-get install bison -y
2)问题
LEX scripts/kconfig/lexer.lex.c
YACC scripts/kconfig/parser.tab.[ch]
/bin/sh: 1: bison: not found
make[1]: *** [scripts/Makefile.host:17: scripts/kconfig/parser.tab.h] Error 127
make: *** [Makefile:594: oldconfig] Error 2
解决:
apt-get install flex
3)
oot@ubuntu:/usr/src/linux-headers-5.4.0-26# make menuconfig
*
* Unable to find the ncurses package.
* Install ncurses (ncurses-devel or libncurses-dev
* depending on your distribution).
解决:
apt-get install libncurses-dev
4)make内核出错
oot@ubuntu:/usr/src/linux-source-5.4.0/linux-source-5.4.0# make
HOSTCC scripts/sign-file
scripts/sign-file.c:25:10: fatal error: openssl/opensslv.h: No such file or directory
25 | #include <openssl/opensslv.h>
| ^~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [scripts/Makefile.host:107: scripts/sign-file] Error 1
make: *** [Makefile:1131: scripts] Error 2
解决: apt install libssl-dev