When I was building Hadoop 3.3.0 on Windows 10, I hit one error about OpenSSL:

CMake Error at C:/Program Files/CMake/share/cmake-3.18/Modules/FindPackageHandleStandardArgs.cmake:165 (message):
  Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the

This error was raised by the following line in CMakeLists.txt:

find_package(OpenSSL REQUIRED)

The following is my environment setup:

-- Building for: Visual Studio 16 2019
-- Selecting Windows SDK version 10.0.18362.0 to target Windows 10.0.18363.
-- The C compiler identification is MSVC 19.26.28806.0
-- The CXX compiler identification is MSVC 19.26.28806.0

CMake version

CMake version is 3.18.0.

C:\hdp\cmaketest>cmake --version
cmake version 3.18.0

CMake suite maintained and supported by Kitware (

Microsoft Visual C++ version

MSVC 19.26.28806.0

OpenSSL version

OpenSSL is installed on Windows using Microsoft vcpkg (a package manager for C++). The version installed in OpenSSL 1.1.18.

C:\hdp\cmaketest>openssl version
OpenSSL 1.1.1g  21 Apr 2020

Reproduce the issue

Follow the steps below can reproduce this issue.

  1. Create project folder C:\hdp\cmaketest
  2. Create file CMakeLists.txt in the project folder with the following content:
    cmake_minimum_required(VERSION 3.10)
    # set the project name
    # Find package
    find_package(OpenSSL REQUIRED)
  3. Run CMake command:
    cmake .
    The error will occur as the following screenshot shows:

Fix this issue

In my system, OpenSSL is installed via vcpkg and installation folder is: C:/vcpkg/installed/x64-windows-static.

Thus to fix this issue, I just need to change the command line to the following:

cmake . -DOPENSSL_ROOT_DIR="C:/vcpkg/installed/x64-windows-static"

The above command line tells CMake that OpenSSL root folder is in the above directory. If you OpenSSL is installed with different triplet or location, please update the command line accordingly. 


CMake: Could NOT find OpenSSL

copyright This page is subject to Site terms.

More from Kontext

Install Hadoop 3.3.0 on Windows 10 Step by Step Guide

local_offer windows10 local_offer hadoop local_offer yarn local_offer hdfs

visibility 96
thumb_up 0
access_time 5 days ago

This detailed step-by-step guide shows you how to install the latest Hadoop v3.3.0 on Windows 10. It leverages Hadoop 3.3.0 winutils tool and WSL is not required. This version was released on July 14 2020. It is the first release of Apache Hadoop 3.3 line. There are significant changes compared with Hadoop 3.2.0, such as Java 11 runtime support, protobuf upgrade to 3.7.1, scheduling of opportunistic containers, non-volatile SCM support in HDFS cache directives, etc.

open_in_new Hadoop

local_offer hadoop local_offer windows10

visibility 31
thumb_up 0
access_time 5 days ago

Winutils is required when installing Hadoop on Windows environment. Hadoop 3.3.0 winutils I've compiled Hadoop 3.3.0 on Windows 10 using CMake and Visual Studio (MSVC x64). Follow these two steps to download it: ...

open_in_new Hadoop

Fix for Hadoop 3.2.1 namenode format issue on Windows 10

local_offer windows10 local_offer hadoop local_offer hdfs

visibility 1141
thumb_up 0
access_time 7 months ago

Issue When installing Hadoop 3.2.1 on Windows 10,  you may encounter the following error when trying to format HDFS  namnode: ERROR namenode.NameNode: Failed to start namenode. The error happens when running the following comm...

open_in_new Hadoop

Compile and Build Hadoop 3.2.1 on Windows 10 Guide

local_offer windows10 local_offer hadoop

visibility 1524
thumb_up 5
access_time 7 months ago

This article provides detailed steps about how to compile and build Hadoop (incl. native libs) on Windows 10. The following guide is based on Hadoop release 3.2.1. ...

open_in_new Hadoop

comment Comments (0)

comment Add comment

Please log in or register to comment.

account_circle Log in person_add Register

Log in with external accounts

No comments yet.

Kontext Column

Created for everyone to publish data, programming and cloud related articles. Follow three steps to create your columns.

Learn more arrow_forward