相关文章推荐
健壮的爆米花  ·  logback ...·  7 月前    · 
稳重的警车  ·  android ...·  1 年前    · 
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

I have RedHat Enterprise Linux Server 7, and I downloaded the linux kernel version 4.12.10 which I am trying to compile but when I execute the following command:

make modules

I get the following error:

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

Does anyone have an idea to fix this please ?

OpenSSL is not used in kernel modules that I am aware. The kernel provides its own crypto, and some of the OpenSSL team contributes to it like Andy Polyakov. Its odd to see OpenSSL in the message above. I guess its some helper program or something to bootstrap things. Its definitely not the kernel proper. – jww Sep 1, 2017 at 22:33 Possible duplicate of How to compile .c file with OpenSSL includes?, Openssl how to compile a simple program?, Compiling C program with OpenSSL, etc. – jww Sep 1, 2017 at 22:34

To fix this problem, you have to install OpenSSL development package, which is available in standard repositories of all modern Linux distributions.

To install OpenSSL development package on Debian, Ubuntu or their derivatives:

$ sudo apt-get install libssl-dev

To install OpenSSL development package on Fedora, CentOS or RHEL:

$ sudo yum install openssl-devel 

Edit : As @isapir has pointed out, for Fedora version>=22 use the DNF package manager :

dnf install openssl-devel
                I have install libssl-dev in ubuntu 22.04, but this error persist, is possible that openssl v3.0.2 dont include this header?
– Maske
                May 19 at 1:26
                After facing up a lot of make errors from the official depository, it seems that cygwin packages works well with cygwin compilers ^^
– Cevik
                Mar 10, 2022 at 8:28
        

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.