编译linux内核openssl / opensslv.h错误(compilation linux kernel openssl/opensslv.h error)

系统教程 行业动态 更新时间:2024-06-14 17:03:54
编译linux内核openssl / opensslv.h错误(compilation linux kernel openssl/opensslv.h error)

我试图在没有在menuconfig选择TCP / IP协议的情况下编译Linux内核,但是当我尝试编译时遇到了这个错误:

scripts / sign-file.c:25:30:致命错误:openssl / opensslv.h:没有这样的文件或目录

编译我使用这个命令:

fakeroot make-kpkg --initrd --append-to-version=-custom kernel_image kernel_headers

我正在使用linux-4.10.1的内核

I am trying to compile a Linux kernel without selecting the TCP/IP protocol in menuconfig but I face this error when I try to compile:

scripts/sign-file.c:25:30: fatal error: openssl/opensslv.h: No such file or directory

To compile I use this command:

fakeroot make-kpkg --initrd --append-to-version=-custom kernel_image kernel_headers

I'm working with linux-4.10.1's kernel

最满意答案

由于make-kpkg是Debian特有的工具,我假设你使用的是Debian发行版; 你提到它是Ubuntu。

看起来你没有构建内核的依赖关系。 您可以使用以下方法安装它们(在Debian / Ubuntu上):

# apt build-dep linux

如果APT缺少源地址,请修改/etc/apt/sources.list以包含一行:

deb-src http://de.archive.ubuntu.com/ubuntu/ DIST main

它应该在该文件中注释(因此前缀为#)。 如果是这样,只需删除#,否则复制deb ...行并将deb更改为deb-src 。 请记住随后重新加载软件包源代码:

# apt update

As make-kpkg is a Debian-specific tool, I assume you are using a Debian distribution; you mentioned it is Ubuntu.

It looks like you don't have the dependencies for building the kernel installed. You can install them (on Debian/Ubuntu) using:

# apt build-dep linux

If APT is missing source addresses, modify your /etc/apt/sources.list to contain a line as:

deb-src http://de.archive.ubuntu.com/ubuntu/ DIST main

It should be commented in that file (so prefixed with a #). If so, just remove the #, otherwise copy the deb ... line and change deb to deb-src. Remember to reload package sources afterwards:

# apt update

更多推荐

本文发布于:2023-04-24 14:14:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/dzcp/5f2ed154ac5bb0ab6d3b3ad2597acd54.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:内核   错误   openssl   linux   opensslv

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!