I am installing CMake in ubuntu, after did the last step "make install", This is the result:

-- Install configuration:""
CMake Error at cmake_install.cmake:36 (FILE):
 file cannot create directory: /user/local/doc/cmake-2.8. Maybe need
 administrative privileges.

make: ***[install] Error 1

does it mean it didn't install successfully?


Installation requires root privilages. So you have to use sudo make install Instead of make install


Do you have a specific requirement to run cmake version 2.8.9? Version 2.8.7 is available from the repositories and can be installed by running the command sudo apt-get install cmake

If you must compile a version yourself you will need to run the make install command as sudo make install as your application needs permissions to install itself into the filesystem.

To check for cmake files after compilation, run the command sudo updatedb and then locate cmake

Finally, run cmake from the command line, without any options, specified and you should get some output on using various command flags if the application compiled correctly.

Update: rolled up previous comments into this answer.

  • how to check it was installed ? – weixi Dec 4 '12 at 9:12
  • I use this method: " ./configure –prefix=/opt/cmake" ---> "make" ----> "sudo make install" --->" /opt/cmake/bin/cmake -version" It shows output: “cmake version 2.8.9”, is it means it install successful?@maggotbrain – weixi Dec 5 '12 at 2:02

You can install cmake under your home directory. To this end you simply need to run the bootstrap script as follows:

./bootstrap --prefix=$HOME

Then you do not need to use sudo command


If you specify a path during make, then it will install to the specified directory. Then you must try with sudo to install to this particular directory as

sudo make install

If you don't select any prefix during make, then it will be installed in your current directory. In that case sudo is not required.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.