linux-6.2.7 の Ubuntu Server 22.04.2へのインストールログです.複数のトラブルが発生します.
sudo su -
apt -y update
apt -y install make gcc flex bison libssl-dev libelf-dev
cd /usr/src
wget https: //cdn.kernel.org/pub /linux/kernel /v6.x/linux -6.2 .7 .tar.xz
tar xfJ linux-6.2 .7 .tar.xz
cd linux-6.2 .7
cp /boot/config-5.15 .0 -67 -generic .config
make oldconfig
make oldconfig の質問への回答は,結局 Enter を連打することになると思います.
make oldconfigで,
Command 'make' not found, but can be installed with: apt install make # version 4.3-4.1build1, or apt install make-guile # version 4.3-4.1build1
となってしまったら,
apt -y install make
を忘れています.
make oldconfigで,
/bin/sh: 1: gcc: not found make[1]: *** [scripts/Makefile.host:111: scripts/basic/fixdep] Error 127 make: *** [Makefile:644: scripts_basic] Error 2
となってしまったら,
apt -y install gcc
を忘れています.
cp .config .config .bak
vi .config
vi .config は以下の2カ所の修正をする
10833行目 CONFIG_SYSTEM_TRUSTED_KEYS="debian/canonical-certs.pem" ↓ CONFIG_SYSTEM_TRUSTED_KEYS="" 10840行目 CONFIG_SYSTEM_REVOCATION_KEYS="debian/canonical-revoked-certs.pem" ↓ CONFIG_SYSTEM_REVOCATION_KEYS=""
make -j8 bzImage modules
make -j8 bzImage modulesで
LEX scripts/kconfig/lexer.lex.c /bin/sh: 1: flex: not found make[2]: *** [scripts/Makefile.host:9: scripts/kconfig/lexer.lex.c] Error 127 make[1]: *** [Makefile:708: syncconfig] Error 2 Makefile:786: include/config/auto.conf.cmd: No such file or directory make: *** [Makefile:809: include/config/auto.conf.cmd] Error 2
となってしまったら
apt -y install flex
を忘れている.
make -j8 bzImage modulesで
YACC scripts/kconfig/parser.tab.[ch] /bin/sh: 1: bison: not found make[2]: *** [scripts/Makefile.host:17: scripts/kconfig/parser.tab.h] Error 127 make[1]: *** [Makefile:708: syncconfig] Error 2 Makefile:786: include/config/auto.conf.cmd: No such file or directory make: *** [Makefile:809: include/config/auto.conf.cmd] Error 2
となってしまったら
apt -y install bison
を忘れている.
make -j8 bzImage modulesで
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:111: scripts/sign-file] Error 1 make: *** [Makefile:1282: scripts] Error 2
となってしまったら
apt -y install libssl-dev
を忘れている.
make -j8 bzImage modulesで
In file included from /usr/src/linux-6.2.7/tools/objtool/include/objtool/objtool.h:13, from /usr/src/linux-6.2.7/tools/objtool/include/objtool/arch.h:11, from /usr/src/linux-6.2.7/tools/objtool/include/objtool/check.h:11, from /usr/src/linux-6.2.7/tools/objtool/include/objtool/special.h:10, from arch/x86/special.c:4: /usr/src/linux-6.2.7/tools/objtool/include/objtool/elf.h:10:10: fatal error: gelf.h: No such file or directory 10 | #include <gelf.h> | ^~~~~~~~ compilation terminated. make[4]: *** [/usr/src/linux-6.2.7/tools/build/Makefile.build:97: /usr/src/linux-6.2.7/tools/objtool/arch/x86/special.o] Error 1 make[3]: *** [/usr/src/linux-6.2.7/tools/build/Makefile.build:139: arch/x86] Error 2 make[2]: *** [Makefile:54: /usr/src/linux-6.2.7/tools/objtool/objtool-in.o] Error 2 make[1]: *** [Makefile:73: objtool] Error 2 make: *** [Makefile:1451: tools/objtool] Error 2
となってしまったら
apt -y install libelf-dev
を忘れている.
make -j8 bzImage modulesで
make[2]: *** No rule to make target 'debian/canonical-certs.pem', needed by 'certs/x509_certificate_list'. Stop. make[1]: *** [scripts/Makefile.build:504: certs] Error 2 make: *** [Makefile:2021: .] Error 2
となってしまったら
vi .config の .configの編集にて 10833行目 CONFIG_SYSTEM_TRUSTED_KEYS="debian/canonical-certs.pem" ↓ CONFIG_SYSTEM_TRUSTED_KEYS=""
を忘れている.
make -j8 bzImage modulesで
make[2]: *** No rule to make target 'debian/canonical-revoked-certs.pem', needed by 'certs/x509_revocation_list'. Stop. make[1]: *** [scripts/Makefile.build:504: certs] Error 2 make: *** [Makefile:2021: .] Error 2
となってしまったら
vi .config の .configの編集にて 10840行目 CONFIG_SYSTEM_REVOCATION_KEYS="debian/canonical-revoked-certs.pem" ↓ CONFIG_SYSTEM_REVOCATION_KEYS=""
を忘れている.
make modules_install install
#linux #ubuntu #カーネル #ubuntu22 #kernel #Ubuntu22_04 #JammyJellyfish #linux6 #linux6_1