Error while installing opecv4.1.0 (Building make files)

I am following the below link
(https://www.pyimagesearch.com/2018/08/15/how-to-install-opencv-4-on-ubuntu/)

While running the command (cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D INSTALL_PYTHON_EXAMPLES=ON -D INSTALL_C_EXAMPLES=OFF -D OPENCV_ENABLE_NONFREE=ON -D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules -D PYTHON_EXECUTABLE=/home/nvidia/Inspection/virtualVenv/bin/python -D BUILD_EXAMPLES=ON …
) i got the following errors.

– Performing Test HAVE_CXX_WMISSING_PROTOTYPES
– Performing Test HAVE_CXX_WMISSING_PROTOTYPES - Failed
– Performing Test HAVE_CXX_WSTRICT_PROTOTYPES
– Performing Test HAVE_CXX_WSTRICT_PROTOTYPES - Failed
– Performing Test HAVE_C_WSIGN_PROMO
– Performing Test HAVE_C_WSIGN_PROMO - Failed
– Performing Test HAVE_CXX_WNO_UNNAMED_TYPE_TEMPLATE_ARGS
– Performing Test HAVE_CXX_WNO_UNNAMED_TYPE_TEMPLATE_ARGS - Failed
– Performing Test HAVE_C_WNO_UNNAMED_TYPE_TEMPLATE_ARGS
– Performing Test HAVE_C_WNO_UNNAMED_TYPE_TEMPLATE_ARGS - Failed
– Performing Test HAVE_C_FVISIBILITY_INLINES_HIDDEN
– Performing Test HAVE_C_FVISIBILITY_INLINES_HIDDEN - Failed
– Performing Test HAVE_C_WNO_ABSOLUTE_VALUE
– Performing Test HAVE_C_WNO_ABSOLUTE_VALUE - Failed
– Performing Test HAVE_CXX_WNO_INCONSISTENT_MISSING_OVERRIDE
– Performing Test HAVE_CXX_WNO_INCONSISTENT_MISSING_OVERRIDE - Failed
– Performing Test HAVE_CXX_WNO_MISSING_PROTOTYPES
– Performing Test HAVE_CXX_WNO_MISSING_PROTOTYPES - Failed
– Performing Test HAVE_CXX_WNO_TAUTOLOGICAL_UNDEFINED_COMPARE
– Performing Test HAVE_CXX_WNO_TAUTOLOGICAL_UNDEFINED_COMPARE - Failed
– Performing Test HAVE_CXX_WNO_SHORTEN_64_TO_32
– Performing Test HAVE_CXX_WNO_SHORTEN_64_TO_32 - Failed
– Performing Test HAVE_CXX_WNO_ENUM_COMPARE_SWITCH
– Performing Test HAVE_CXX_WNO_ENUM_COMPARE_SWITCH - Failed

– Could NOT find Pylint (missing: PYLINT_EXECUTABLE)
– Could NOT find Flake8 (missing: FLAKE8_EXECUTABLE)
– VTK is not found. Please set -DVTK_DIR in CMake to VTK build directory, or to VTK install subdirectory with VTKConfig.cmake file
– Performing Test CXX_HAS_MFPU_NEON
– Performing Test CXX_HAS_MFPU_NEON - Failed
– Performing Test C_HAS_MFPU_NEON
– Performing Test C_HAS_MFPU_NEON - Failed
CMake Error at cmake/OpenCVModule.cmake:288 (message):
No modules has been found: /home/nvidia/opencv_contrib/modules
Call Stack (most recent call first):
cmake/OpenCVModule.cmake:370 (_glob_locations)
modules/CMakeLists.txt:7 (ocv_glob_modules)

– Performing Test HAVE_CXX_WNO_UNUSED_PRIVATE_FIELD
– Performing Test HAVE_CXX_WNO_UNUSED_PRIVATE_FIELD - Failed

Please try to use below script: