0

Relatively newer Linux user here, currently trying to install a library called spglib. Following some directions I found online, I have installed cmake, I unzip the install folder, then I perform:

cd spglib
mkdir _build
cd _build
cmake ..
make
make install

However, after this last command I get the following error:

[ 50%] Built target symspg_static
[100%] Built target symspg
Install the project...
-- Install configuration: "Release"
-- Installing: /usr/local/lib64/libsymspg.so.2.0.1
CMake Error at cmake_install.cmake:52 (file):
  file INSTALL cannot copy file
  "/global/homes/f/fcoen/spglib/_build/libsymspg.so.2.0.1" to
  "/usr/local/lib64/libsymspg.so.2.0.1": Permission denied.

I understand the issue is that I'm trying to write to a folder I don't have permission to on the supercomputer I'm using. From the research I've done, I need to change the target install directory, perhaps by including a prefix variable in the Makefile. However I've tried a bunch of different things, without any success, and have exhausted my ideas at the moment. My background is more physics than CS so feel pretty out of my wheelhouse here, any guidance on how to get this installation running would be super appreciated thanks.

FrankC
  • 1
  • 1
  • You should put down any documentation and close any browser pages that you are reading related to Makefiles. You are using CMake here and CMake will _generate_ your makefiles, and so it's the CMake documentation you need to be reading so you can change the way CMake generates the makefiles. Some Google-fu led me here: https://cmake.org/cmake/help/latest/variable/CMAKE_INSTALL_PREFIX.html – MadScientist Sep 12 '22 at 20:01

0 Answers0