How can i resolve this error when installing ROOT

It looks like your “/usr/local/bin/cmake” is misbehaving.

Try to download and unpack a binary release from: CMake.org → Download Latest Release

@Axel Which CMake version are you using now on Ubuntu 18.04 when building “official” binary releases?