linux-6.5 の Ubuntu Desktop 22.04.3 へのインストール

linux-6.5 の Ubuntu Desktop 22.04.3 へのインストールログです.複数のトラブルが発生しま

sudo su -
apt -y update
apt -y install make gcc make gcc flex bison libelf-dev libssl-dev
cd /usr/src
wget https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-6.5.tar.xz
tar xfJ linux-6.5.tar.xz
cd linux-6.5
cp /boot/config-6.2.0-26-generic .config
make oldconfig

make oldconfig の質問への回答は,結局 Enter を連打することになると思います.

もし
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
を忘れています

もし
/bin/sh: 1: gcc: not found
make[2]: *** [scripts/Makefile.host:114: scripts/basic/fixdep] Error 127
make[1]: *** [/usr/src/linux-6.5/Makefile:641: scripts_basic] Error 2
make: *** [Makefile:234: __sub-make] Error 2
となってしまったら
apt -y install gcc
を忘れています

もし
/bin/sh: 1: flex: not found
make[2]: *** [scripts/Makefile.host:9: scripts/kconfig/lexer.lex.c] Error 127
make[1]: *** [/usr/src/linux-6.5/Makefile:705: oldconfig] Error 2
make: *** [Makefile:234: __sub-make] Error 2
となってしまったら
apt -y install flex
を忘れています

もし
/bin/sh: 1: bison: not found
make[2]: *** [scripts/Makefile.host:17: scripts/kconfig/parser.tab.h] Error 127
make[1]: *** [/usr/src/linux-6.5/Makefile:705: oldconfig] Error 2
make: *** [Makefile:234: __sub-make] Error 2
となってしまったら
apt -y install bison
を忘れています

cp .config .config.bak
vi .config

vi .config は以下の2カ所の修正をする

11360行目
CONFIG_SYSTEM_TRUSTED_KEYS="debian/canonical-certs.pem"

CONFIG_SYSTEM_TRUSTED_KEYS=""

11367行目
CONFIG_SYSTEM_REVOCATION_KEYS="debian/canonical-revoked-certs.pem"

CONFIG_SYSTEM_REVOCATION_KEYS=""

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[2]: *** [scripts/Makefile.host:114: scripts/sign-file] Error 1
make[1]: *** [/usr/src/linux-6.5/Makefile:1271: scripts] Error 2
make: *** [Makefile:234: __sub-make] Error 2
となってしまったら
apt -y install libssl-dev
を忘れています

もし
<stdin>:1:10: fatal error: libelf.h: No such file or directory
compilation terminated.
INSTALL libsubcmd_headers
CC /usr/src/linux-6.5/tools/objtool/arch/x86/special.o
In file included from /usr/src/linux-6.5/tools/objtool/include/objtool/objtool.h:13,
from /usr/src/linux-6.5/tools/objtool/include/objtool/arch.h:11,
from /usr/src/linux-6.5/tools/objtool/include/objtool/check.h:11,
from /usr/src/linux-6.5/tools/objtool/include/objtool/special.h:10,
from arch/x86/special.c:4:
/usr/src/linux-6.5/tools/objtool/include/objtool/elf.h:10:10: fatal error: gelf.h: No such file or directory
10 | #include <gelf.h>
| ^~~~~~~~
compilation terminated.
make[5]: *** [/usr/src/linux-6.5/tools/build/Makefile.build:98: /usr/src/linux-6.5/tools/objtool/arch/x86/special.o] Error 1
make[4]: *** [/usr/src/linux-6.5/tools/build/Makefile.build:140: arch/x86] Error 2
make[3]: *** [Makefile:66: /usr/src/linux-6.5/tools/objtool/objtool-in.o] Error 2
make[2]: *** [Makefile:73: objtool] Error 2
make[1]: *** [/usr/src/linux-6.5/Makefile:1440: tools/objtool] Error 2
make: *** [Makefile:234: __sub-make] Error 2
となってしまったら
apt -y install libelf-dev
を忘れています

make modules_install install

#linux
#ubuntu
#ubuntudesktop
#カーネル
#ubuntu22
#Ubuntu22_04
#Ubuntu22_04_3
#Lobster
#kernel
#linux6
#linux6_5

この記事が気に入ったらサポートをしてみませんか?