error: openssl/bio.h: No such file or directory
【问题】
虚拟机 VM Ware 重新安装的 ubuntu 22.04,在编译Linux 内核时,报【编译错误】,提示 openssl/bio.h: No such file or directory
scripts/extract-cert.c:21:10: fatal error: openssl/bio.h: No such file or directory
21 | #include <openssl/bio.h>
| ^~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [scripts/Makefile.host:95: scripts/extract-cert] Error 1
【解决】
使用 sudo apt install openssl,提示 openssl 已经安装
Reading package lists... Done Building dependency tree... Done Reading state information... Done openssl is already the newest version (3.0.2-0ubuntu1.7). openssl set to manually installed. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
-
经过尝试,需要安装 libssl-dev
-
sudo apt install libssl-dev 后,发现编译错误消除,问题解决
Reading package lists... Done Building dependency tree... Done Reading state information... Done Suggested packages: libssl-doc The following NEW packages will be installed: libssl-dev 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 2372 kB of archives. After this operation, 12.4 MB of additional disk space will be used. Get:1 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 libssl-dev amd64 3.0.2-0ubuntu1.7 [2372 kB] Fetched 2372 kB in 10s (236 kB/s) Selecting previously unselected package libssl-dev:amd64. (Reading database ... 34949 files and directories currently installed.) Preparing to unpack .../libssl-dev_3.0.2-0ubuntu1.7_amd64.deb ... Unpacking libssl-dev:amd64 (3.0.2-0ubuntu1.7) ... Setting up libssl-dev:amd64 (3.0.2-0ubuntu1.7) ...【问题】 虚拟机 VM Ware 重新安装的 ubuntu 22.04,在编译Linux 内核时,报【编译错误】,提示 openssl/bio.h: No such file or directory scripts/extract-cert.c:21:10: fatal error: openssl/bio.h: No such file or directory 21 | #include