I have faced a similar issue while installing mofem (install_mofem_developer.sh) on my linux machine (Ubuntu 20.04.6 LTS).
The installation runs well until the command "spack install --only dependencies mofem-cephas ^petsc+X" is typed.
I have tried running the original ".sh" file and creating a mirror for spack (commented lines in the install_mofem_developer.sh file: lines 149-161).
Moreover, I do not have "homebrew" installed in this machine.
The error message is shown below.
==> Bootstrapping clingo from pre-built binaries
==> Bootstrapping clingo from sources
[+] /usr (external bison-3.5.1-nggfxvv33iyzgy2emkdqyqrx4khu4ffs)
[+] /usr/local (external cmake-3.21.3-nwsoow6t2654olt3ant5n6wqaf3meqqo)
[+] /opt/intel/oneapi/intelpython/latest (external python-3.7-wa6pgyy74qfunfivtuhn4acoa7kwe5c3)
==> Installing re2c-2.2-wfvnq777f4g2lmmgtc3lv2cf7k6ywvjm
==> No binary for re2c-2.2-wfvnq777f4g2lmmgtc3lv2cf7k6ywvjm found: installing from source
==> Fetching
https://mirror.spack.io/_source-cache/archive/0f/0fc45e4130a8a555d68e230d1795de0216dfe99096b61b28e67c86dfd7d86bda.tar.xz==> Error: FileNotFoundError: [Errno 2] No such file or directory: '/tmp/EMSE2000\\f.sempertegui/spack-stage/spack-stage-re2c-2.2-wfvnq777f4g2lmmgtc3lv2cf7k6ywvjm/re2c-2.2.tar.xz'
/home/f.sempertegui/mofem_dev/mofem_install/spack/lib/spack/spack/package.py:1406, in do_fetch:
1403
1404 self.stage.create()
1405 err_msg = None if not self.manual_download else self.download_instr
>> 1406 start_time = time.time()
1407 self.stage.fetch(mirror_only, err_msg=err_msg)
1408 self._fetch_time = time.time() - start_time
1409
See build log for details:
/tmp/EMSE2000\f.sempertegui/spack-stage/spack-stage-re2c-2.2-wfvnq777f4g2lmmgtc3lv2cf7k6ywvjm/spack-build-out.txt
==> Warning: Skipping build of clingo-bootstrap-spack-ejilmbb2vkspy7o6oacm4ra5hpphchlt since re2c-2.2-wfvnq777f4g2lmmgtc3lv2cf7k6ywvjm failed
==> Error: cannot bootstrap the "clingo" Python module from spec "clingo-bootstrap@spack+python %gcc target=x86_64" due to the following failures:
'spack-install' raised InstallError: Terminating after first install failure: FileNotFoundError: [Errno 2] No such file or directory: '/tmp/EMSE2000\\f.sempertegui/spack-stage/spack-stage-re2c-2.2-wfvnq777f4g2lmmgtc3lv2cf7k6ywvjm/re2c-2.2.tar.xz'
Please run `spack -d spec zlib` for more verbose error messages