Building cmake

Hello again,

I am using MacOS but I want to build ParaView on a computing cluster. When I tried to build cmake, it was giving this error:

CMake Error at Source/kwsys/cmake_install.cmake:46 (file):
  file cannot create directory: /usr/local/doc/cmake-3.20/cmsys.  Maybe need
  administrative privileges.
Call Stack (most recent call first):
  cmake_install.cmake:47 (include)


make: *** [install] Error 1

In the other discussion I was answered to use sudo or to set CMAKE_INSTALL_PREFIX but I do not get it what was exactly meant. Just doing
sudo
in my home directory in the terminal again says:
-bash: /usr/bin/sudo: Permission denied

Thanks,
Salome

This is the ParaView discourse, not cmake.
https://discourse.cmake.org/