Steven R Brandt
Steven R Brandt

Reputation: 5

I am unable to get "spack mirror add" to work

I decided I wanted to install [email protected] with spack, so I ran the command spack --insecure install [email protected]. This attempts to download https://ftpmirror.gnu.org/gcc/gcc-10.2/gcc-10.2.tar.xz, which no longer exists.

I downloaded gcc-10.2.tar.xz from a valid mirror, and attempted to add a mirror.

I've tried variants of the form

$ spack mirror add local_filesystem gcc-10.2.tar.xz

However, spack install [email protected] still gives the same answer.

I can't figure out how to get spack to use the mirror for installing. What am I missing?

Upvotes: 1

Views: 361

Answers (1)

Frank Willmore
Frank Willmore

Reputation: 76

My understanding is that you would first use spack to create the mirror, e.g.:

spack mirror create -d /tmp/mirror [email protected] 

This will create the directory /tmp/mirror and download a tarball to /tmp/mirror_source_cache, with symbolic link to /tmp/mirror/gcc:

$ ll /tmp/mirror/gcc/gcc-10.2.0.tar.xz 
lrwxrwxrwx. 1 willmore jlse 99 Nov 30 20:32 /tmp/mirror/gcc/gcc-10.2.0.tar.xz -> ../_source-cache/archive/b8/b8dd4368bb9c7f0b98188317ee0254dd8cc99d1e3a18d0ff146c855fe16c1d8c.tar.xz

Even if you aren't able to create the mirror automatically with spack mirror create, you can still put the tarball directly where that symlink is.

Then add the mirror (which is just that directory):

spack mirror add my_mirror file:///tmp/mirror

TLDR: The mirror isn't just the tarball, but it contains the tarball. Also, you may try adding the public mirror:

spack-public    https://spack-llnl-mirror.s3-us-west-2.amazonaws.com/

Upvotes: 0

Related Questions