Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could NOT find OpenSSL, try to set the path to OpenSSL root folder

I extracted Cmake zip file (downloaded from github) and tried to install it but an error occured. I tried installing OpenSSL and tried to install Cmake but Error(same) is still comming

Terminal output is below :

CMake 3.16.20191118, Copyright 2000-2019 Kitware, Inc. and Contributors
Found GNU toolchain
C compiler on this system is: gcc   
C++ compiler on this system is: g++    
Makefile processor on this system is: make
g++ has setenv
g++ has unsetenv
g++ does not have environ in stdlib.h
g++ has stl wstring
g++ has <ext/stdio_filebuf.h>
---------------------------------------------
make: 'cmake' is up to date.
loading initial cache file /root/Cmake/Bootstrap.cmk/InitialCacheFlags.cmake
-- Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY OPENSSL_INCLUDE_DIR)
-- Configuring incomplete, errors occurred!
See also "/root/Cmake/CMakeFiles/CMakeOutput.log".
See also "/root/Cmake/CMakeFiles/CMakeError.log".
---------------------------------------------
Error when bootstrapping CMake:
Problem while running initial CMake
---------------------------------------------
like image 463
ghost21blade Avatar asked Nov 18 '19 11:11

ghost21blade


1 Answers

I ran into the same problem today trying to compile cmake 3.16-rc4 under Ubuntu 18.04. While trying to fix that by setting appropriate paths and looking for them in the first place, I discovered this: How do I install the OpenSSL libraries on Ubuntu?

So the solution is to simply do:

sudo apt install libssl-dev

So cmake obviously needs the dev package of openssl. Kudos to Niki Yoshiuchi, who has given the desired answer in the linked question.

like image 178
Zacryon Avatar answered Nov 14 '22 07:11

Zacryon