Error in make install: "cannot copy file"
Try sudo make install
.
To access the /usr
directory of your installation to store system-wide files there, the installer needs root privileges. Therefore you can not just run plain make install
as your normal user account but need to use sudo
to elevate privileges.
If want to install without root / sudo try DCMAKE_INSTALL_PREFIX
option:
mkdir -p $HOME/opt
cmake -DCMAKE_INSTALL_PREFIX=$HOME/opt .
make
make install
Consider adding folder to PATH, in order to use it by name only
export PATH="$HOME/opt/bin:$PATH" # for binaries
export LD_LIBRARY_PATH="$HOME/opt/lib:$LD_LIBRARY_PATH" # for libs
export CPATH="$HOME/opt/include:$CPATH" # for includes