I'm trying to install a library using a script I found (https://gist.github.com/kparrish/6440812) but when I run the script I get the following error message:

tar (child): /root/Downloads/spglib-1.5.2.tar.gz: Cannot open: Permission denied

How can I fix this? Alternatively, can anyone recommend another way of installing spglib? I'm very new to ubuntu and I have no prior experience unfortunately.

Thanks in advance

  • 2
    Not sure why you seem to have downloaded it as root...but avoid doing that.
    – user535733
    Jul 1, 2020 at 17:03
  • 1
    To fix your problem you can follow iceblizzard's answer, but I strongly suggest you to learn a bit about permissions - they're important for Linux security and privacy and they are very useful in some situations. You can begin with help.ubuntu.com/community/FilePermissions.
    – Ntakwetet
    Jul 1, 2020 at 17:05

1 Answer 1


Just clone the git repo and build. You need to install git, make and cmake for this to work. If not installed, use the following to install:

sudo apt install git build-essential cmake

Then clone and build:

git clone https://github.com/spglib/spglib.git
cd spglib
mkdir build
cd build
cmake ..
sudo make install

You must log in to answer this question.

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