在Ubuntu编译PREEMPT_RT时报错,因为之前安装libssl-dev装不上,就装了libssl-dev:i386,后面编译的时候还是报错了:
问题:
@ubuntu:~/kernel/linux-4.16.18# make
Makefile:976: "Cannot use CONFIG_STACK_VALIDATION=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel"
CHK include/config/kernel.release
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
CHK include/generated/timeconst.h
CHK include/generated/bounds.h
CHK include/generated/asm-offsets.h
CALL scripts/checksyscalls.sh
CHK scripts/mod/devicetable-offsets.h
HOSTCC scripts/sign-file
In file included from /usr/include/openssl/bio.h:13:0,
from scripts/sign-file.c:26:
/usr/include/openssl/e_os2.h:13:11: fatal error: openssl/opensslconf.h: No such file or directory
# include <openssl/opensslconf.h>
^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
scripts/Makefile.host:90: recipe for target 'scripts/sign-file' failed
make[1]: *** [scripts/sign-file] Error 1
Makefile:566: recipe for target 'scripts' failed
make: *** [scripts] Error 2
解决方法:
sudo apt-get install libssl-dev
如果安装不了则先安装libssl-dev:i386,在装** libssl-dev**
dpkg --add-architecture i386
apt-get update
apt-get install libssl-dev:i386
sudo apt-get install libssl-dev
再make
就可以了