8

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?

4 Answers 4

7

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

1

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

0

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.

2
  • how to check it was installed ?
    – weixi
    Dec 4, 2012 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, 2012 at 2:02
0

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .