Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fix: fatal error: openssl/opensslv.h: No such file or directory in RedHat 7

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 ?

like image 886
rainman Avatar asked Sep 01 '17 22:09

rainman


4 Answers

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
like image 182
user10089632 Avatar answered Nov 11 '22 04:11

user10089632


For Alpine Linux:

apk add openssl-dev
like image 34
cstroe Avatar answered Nov 11 '22 04:11

cstroe


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

libssl-devel

like image 4
John Peurifoy Avatar answered Nov 11 '22 03:11

John Peurifoy


for resolving this issue install:

# yum install openssl openssl-devel

and then try again to do make bzImage.

like image 1
Arash Foroughi Avatar answered Nov 11 '22 02:11

Arash Foroughi