Make Install Error, when trying to install Cmake o

2020-04-30 03:04发布

问题:

I am trying to install Cmake on macOS Sierra, and I followed every step here http://mac-dev-env.patrickbougie.com/cmake/, but as I get to

make install 

I get this error:

-- Install configuration: "" CMake Error at cmake_install.cmake:31 (file): file cannot create directory: /usr/local/mac-dev-env/cmake-3.9.2/doc/cmake-3.9. Maybe need administrative privileges.

make: *** [install] Error 1

what am I doing wrong?

p.s: I have xcode installed on my system.

回答1:

The message tells you what you need to do, you need admin privileges. On macOS, that means you need to utilize the sudo command.

sudo make install

and enter your administrative password at the prompt.