83

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 ?

2

4 Answers 4

167

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
3
  • 4
    In modern Fedora: dnf install -y openssl-devel
    – isapir
    Mar 13, 2018 at 6:37
  • On Ubuntu, libssl-dev gave me what I needed (while openssl-dev did not). Jan 11, 2023 at 4:15
  • 1
    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, 2023 at 1:26
35

For Alpine Linux:

apk add openssl-dev
4

On CYGwin, you can install this as a typical package in the first screen. Look for

libssl-devel

1
  • 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
1

for resolving this issue install:

# yum install openssl openssl-devel

and then try again to do make bzImage.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.