I need to install a software that needs cmake. Every step till make install work fine. Then at make install this is the error:
CMake Error at Source/kwsys/cmake_install.cmake:46 (file):
file cannot create directory: /usr/local/doc/cmake-3.18/cmsys. Maybe need
administrative privileges.
Call Stack (most recent call first):
cmake_install.cmake:47 (include)
make: *** [install] Error 1
I don’t have administrative privileges, so i can’t just add sudo.
I am new to working with this, so please be a little bit easy to understand
2
Answers
When running
cmake
, you can tell CMake to install the software in some other location that you have access to. Just set theCMAKE_INSTALL_PREFIX
variable to point to that location. So, yourcmake
command line might change from:to this:
See this response for another way to do this in the CMake file itself.
You can also use the good old
DESTDIR
(ed work, at least, with Makefile generator, and don’t need to reconfigure).ref: https://www.gnu.org/prep/standards/html_node/DESTDIR.html
which should install in
/home/username/software/usr/local/[bin|lib|include]/...