错误记录编译 Linux 内核报错 ( fatal error: openssl/opensslv.h: No such file or directory )
Posted 韩曙亮
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了错误记录编译 Linux 内核报错 ( fatal error: openssl/opensslv.h: No such file or directory )相关的知识,希望对你有一定的参考价值。
文章目录
一、报错信息
编译 Linux 内核 , 执行
sudo make
命令 , 开始正式编译 Linux 内核 , 报如下错误 :
root@ubuntu:~/kernel/linux-5.6.14# sudo make
SYSTBL arch/x86/include/generated/asm/syscalls_32.h
SYSHDR arch/x86/include/generated/asm/unistd_32_ia32.h
SYSHDR arch/x86/include/generated/asm/unistd_64_x32.h
SYSTBL arch/x86/include/generated/asm/syscalls_64.h
HYPERCALLS arch/x86/include/generated/asm/xen-hypercalls.h
SYSHDR arch/x86/include/generated/uapi/asm/unistd_32.h
SYSHDR arch/x86/include/generated/uapi/asm/unistd_64.h
SYSHDR arch/x86/include/generated/uapi/asm/unistd_x32.h
HOSTCC arch/x86/tools/relocs_32.o
HOSTCC arch/x86/tools/relocs_64.o
HOSTCC arch/x86/tools/relocs_common.o
HOSTLD arch/x86/tools/relocs
HOSTCC scripts/selinux/genheaders/genheaders
HOSTCC scripts/selinux/mdp/mdp
HOSTCC scripts/bin2c
HOSTCC scripts/kallsyms
HOSTCC scripts/recordmcount
HOSTCC scripts/sorttable
HOSTCC scripts/asn1_compiler
HOSTCC scripts/sign-file
scripts/sign-file.c:25:30: fatal error: openssl/opensslv.h: No such file or directory
compilation terminated.
scripts/Makefile.host:107: recipe for target 'scripts/sign-file' failed
make[1]: *** [scripts/sign-file] Error 1
Makefile:1106: recipe for target 'scripts' failed
make: *** [scripts] Error 2
root@ubuntu:~/kernel/linux-5.6.14#
二、解决方案
执行
sudo apt-get install libssl-dev
命令 , 安装 OpenSSL ;
安装过程如下 :
root@ubuntu:~/kernel/linux-5.6.14# sudo apt-get install libssl-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libssl-doc zlib1g-dev
The following NEW packages will be installed:
libssl-dev libssl-doc zlib1g-dev
0 upgraded, 3 newly installed, 0 to remove and 154 not upgraded.
Need to get 2,591 kB of archives.
After this operation, 10.5 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 zlib1g-dev amd64 1:1.2.8.dfsg-2ubuntu4.3 [167 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libssl-dev amd64 1.0.2g-1ubuntu4.20 [1,347 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libssl-doc all 1.0.2g-1ubuntu4.20 [1,077 kB]
Fetched 2,591 kB in 2s (867 kB/s)
Selecting previously unselected package zlib1g-dev:amd64.
(Reading database ... 212370 files and directories currently installed.)
Preparing to unpack .../zlib1g-dev_1%3a1.2.8.dfsg-2ubuntu4.3_amd64.deb ...
Unpacking zlib1g-dev:amd64 (1:1.2.8.dfsg-2ubuntu4.3) ...
Selecting previously unselected package libssl-dev:amd64.
Preparing to unpack .../libssl-dev_1.0.2g-1ubuntu4.20_amd64.deb ...
Unpacking libssl-dev:amd64 (1.0.2g-1ubuntu4.20) ...
Selecting previously unselected package libssl-doc.
Preparing to unpack .../libssl-doc_1.0.2g-1ubuntu4.20_all.deb ...
Unpacking libssl-doc (1.0.2g-1ubuntu4.20) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up zlib1g-dev:amd64 (1:1.2.8.dfsg-2ubuntu4.3) ...
Setting up libssl-dev:amd64 (1.0.2g-1ubuntu4.20) ...
Setting up libssl-doc (1.0.2g-1ubuntu4.20) ...
root@ubuntu:~/kernel/linux-5.6.14#
以上是关于错误记录编译 Linux 内核报错 ( fatal error: openssl/opensslv.h: No such file or directory )的主要内容,如果未能解决你的问题,请参考以下文章
错误记录编译 Linux 内核报错 ( /bin/sh: 1: flex: not found )
错误记录编译 Linux 内核报错 ( Unable to find the ncurses package. )
错误记录编译 ijkplayer 报错 (fatal error: ijksoundtouch/ijksoundtouch_wrap.h: No such file or directory )
错误记录编译 ijkplayer 报错 (fatal error: libyuv.h: No such file or directory #include “libyuv.h“ )
错误记录Windows 控制台程序编译报错 ( fatal error C1083: 无法打开包括文件: “afxwin.h”: No such file or directory )