关于ubuntu18.04升级内核到6.1.22版本总结
首先按照以下教程直接安装官网的deb,但是出现内核头文件报错无法安装的问题,很多高版本的内核都需要依赖libc6到2.34版本以上,libssl3版本需要3.0.0以上,但这两个系统库网上很难找到安装教程,就此作罢。
https://blog.csdn.net/wangjl2416/article/details/125071405?spm=1001.2014.3001.5502
然后想到可以从源码编译内核,
https://zhuanlan.zhihu.com/p/437506971
https://blog.csdn.net/huangjunsheng123/article/details/116202848
按照第一个链接,报错,于是又转到第二个链接,直接修改 .config 文件,把CONFIG_MODULE_SIG_ALL,CONFIG_MODULE_SIG_KEY和CONFIG_SYSTEM_TRUSTED_KEYS三项注释掉,编译时系统会自动生成一次性密钥来加密,另外记得把CONFIG_DEBUG_INFO=y去掉,不然新内核带debug信息超大。
修改后编译,又报了其他错误,错误如下:
make[5]: *** No rule to make target 'debian/canonical-revoked-certs.pem', needed by 'certs/x509_revocation_list'. Stop. scripts/Makefile.build:500: recipe for target 'certs' failed make[4]: *** [certs] Error 2 Makefile:2012: recipe for target '.' failed make[3]: *** [.] Error 2 debian/rules:7: recipe for target 'build-arch' failed make[2]: *** [build-arch] Error 2 dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2 scripts/Makefile.package:76: recipe for target 'deb-pkg' failed make[1]: *** [deb-pkg] Error 2 Makefile:1656: recipe for target 'deb-pkg' failed make: *** [deb-pkg] Error 2
解决办法:

修改后编译,继续报错:
make[4]: *** [vmlinux] Error 1 Makefile:1255: recipe for target 'vmlinux' failed make[3]: *** [vmlinux] Error 2 debian/rules:7: recipe for target 'build-arch' failed make[2]: *** [build-arch] Error 2 dpkg-buildpackage: error: debian/rules binary subprocess returned exit status 2 scripts/Makefile.package:76: recipe for target 'deb-pkg' failed make[1]: *** [deb-pkg] Error 2 Makefile:1656: recipe for target 'deb-pkg' failed make: *** [deb-pkg] Error 2
解决办法:
禁用CONFIG_DEBUG_INFO_BTF
修改后编译,编译成功,如图


接下来按照原来的链接开始安装,完美安装成功如图:

立刻重启,检测版本:
