Skip to content

Instantly share code, notes, and snippets.

@1duo
Last active April 23, 2024 15:58
Show Gist options
  • Save 1duo/38af1abd68a2c7fe5087532ab968574e to your computer and use it in GitHub Desktop.
Save 1duo/38af1abd68a2c7fe5087532ab968574e to your computer and use it in GitHub Desktop.
Install CMake on CentOS 7.

Download CMake from: https://cmake.org/download/

wget https://cmake.org/files/v3.12/cmake-3.12.3.tar.gz

Compile from source and install

tar zxvf cmake-3.*
cd cmake-3.*
./bootstrap --prefix=/usr/local
make -j$(nproc)
make install

Validate installation

cmake --version

cmake version *.*.*
CMake suite maintained and supported by Kitware (kitware.com/cmake).
@Rootsramos
Copy link

Have an error with the install command

collect2: error: ld returned 1 exit status
make[2]: *** [Utilities/cmcurl/CMakeFiles/LIBCURL.dir/build.make:88: Utilities/cmcurl/LIBCURL] Error 1
make[1]: *** [CMakeFiles/Makefile2:1533: Utilities/cmcurl/CMakeFiles/LIBCURL.dir/all] Error 2
make: *** [Makefile:163: all] Error 2

Any idea to fix it?

Thanks in advance

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment