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) ...

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值