Computing and Networks

Kernel fatal error: openssl/aes.h

So, I’ve walked into this one a few times when compiling a new kernel for the first time after a new distro install.  Each time I shake my head and can’t believe I did again.

When compiling a new linux kernel and fails with the following error

fatal error: openssl/aes.h: No such file or directory

It means that it is trying to build in OpenSSL but the library and header files it is linking to can’t be found, usually meaning they are not installed.

The fix is fairly straight forward, install or reinstall the OpenSSL development package.

Debian and derivatives like Ubuntu etc

$ sudo apt-get install libssl-dev
RHEL and derivatives like CentOS etc
$ sudo yum install openssl-devel

Arch linux and the like do things a bit different than other distros for one there are no -devel or -dev the source IS IN THE PACKAGE so when you install OpenSSL with pacman (it is in the core repositiry), you get the development libraries and headers.

TL;DR: Install missing package, recompile, profit.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s