0

I'm getting this error on Manjaro when trying to run cmake .. in a folder:

CMake Error: Could not find CMAKE_ROOT !!!
CMake has most likely not been installed correctly.
Modules directory not found in

cmake version 3.25.2

CMake suite maintained and supported by Kitware (kitware.com/cmake).

I've installed cmake through sudo pamac install base-devel and I normally use clion, pointing to /usr/bin/cmake instead of the bundled cmake. I've tried using export CMAKE_ROOT=/usr/share/cmake as well as export CMAKE_ROOT=/usr/bin/cmake and sourcing my bashrc file and it still shows the same error. I've uninstalled cmake and reinstalled it, and still no-go. I've tried to run the command using /usr/bin/cmake and it doesn't work.

Occlusion
  • 11
  • 1
  • You can try installing CMake with: `sudo snap install cmake --classic`. Then check `cmake` works from the command line. CLion should show it has found a CMake in `Settings > Build, Execution, Deployment > Toolchains`. – rturrado Jan 30 '23 at 15:02
  • 1
    Directory pointed by `CMAKE_ROOT` variable should be the one containing `Modules` subdirectory. – Tsyvarev Jan 30 '23 at 15:06
  • If you have a package bug, report a bug to the package maintainers. – starball Jan 30 '23 at 18:22
  • 1
    @rturrado using the snap cmake worked, thanks! – Occlusion Jan 30 '23 at 23:24

0 Answers0