1

I'm new in Linux and I trying to install CMAKE but I get on this error . How can fix that:

dania@dania:~/sz/lin/build$ cmake .. -D CMAKE_INSTALL_PREFIX:PATH=[INSTALL_DIR] CMake Error: The source directory "/home/dania/sz/lin/build/CMAKE_INSTALL_PREFIX:PATH=[INSTALL_DIR]" does not exist. Specify --help for usage, or press the help button on the CMake GUI.

Dania
  • 55
  • 1
  • 7
  • 1
    possible duplicate: https://stackoverflow.com/questions/6241922/how-to-use-cmake-install-prefix (and i cannot make a comment) – Andy Feb 17 '22 at 13:20
  • Where I should put CMakeLists.txt ? in side ~/sz/lin/build ? because when I run cmake -DCMAKE_INSTALL_PREFIX=/usr .. I get : CMake Error: The source directory "/home/dania/sz/lin" does not appear to contain CMakeLists.txt. Specify --help for usage, or press the help button on the CMake GUI. – Dania Feb 17 '22 at 13:39
  • Why do you specify `CMAKE_INSTALL_PREFIX:PATH=[INSTALL_DIR]` and where did you pick this up? You are probably reading an instruction about how to build `cmake` from source, which you don't need to do at all if you have already installed it with `apt-get`. (And if you do want to do that, `[INSTALL_DIR]` should be replaced with the actual installation directory.) – tripleee Feb 17 '22 at 14:17

1 Answers1

2

To install cmake cross-platform, open-source make system in all currently supported versions of Debian open the terminal and type:

sudo apt install cmake
karel
  • 5,489
  • 46
  • 45
  • 50