spack install failed with bootstrapping [How to Solve]

spack install failed with bootstrapping

An error occurs when spack is used for the first time,

[[email protected] ~]$ spack install python
==> Bootstrapping clingo from pre-built binaries
==> Bootstrapping clingo from sources
==> Error: cannot bootstrap the "clingo" Python module from spec "[email protected]+python %gcc target=x86_64" due to the following failures:
    'spack-install' raised ConflictsInSpecError: Conflicts in concretized spec "[email protected]%[email protected]~docs~ipo+python~static_libstdcpp build_type=Release arch=linux-centos7-x86_64/6hb2rkn"

    List of matching conflicts for spec:

    [email protected]%[email protected]~docs~ipo+python~static_libstdcpp build_type=Release arch=linux-centos7-x86_64
        ^[email protected]%[email protected] arch=linux-centos7-x86_64
            ^[email protected]%[email protected] arch=linux-centos7-x86_64
                ^[email protected]%[email protected] libs=shared,static arch=linux-centos7-x86_64
            ^[email protected]%[email protected]+sigsegv patches=9dc5fbd0d5cb1037ab1e6d0ecc74a30df218d0a94bdd5a02759a97f62daca573,bfdffa7c2eb01021d5849b36972c069693654ad826c1a20b53534009a4ec7a89 arch=linux-centos7-x86_64
                ^[email protected]%[email protected] arch=linux-centos7-x86_64
            ^[email protected]%[email protected]+cpanm+shared+threads arch=linux-centos7-x86_64
                ^[email protected]%[email protected]+cxx~docs+stl patches=b231fcc4d5cff05e5c3a4814f6a5af0e9a966428dc2176540d2c05aff41de522 arch=linux-centos7-x86_64
                ^[email protected]%[email protected]~debug~pic+shared arch=linux-centos7-x86_64
                ^[email protected]%[email protected] arch=linux-centos7-x86_64
                    ^[email protected]%[email protected] arch=linux-centos7-x86_64
                        ^[email protected]%[email protected]~symlinks+termlib abi=none arch=linux-centos7-x86_64
                            ^[email protected]%[email protected] arch=linux-centos7-x86_64
                ^[email protected]%[email protected]+optimize+pic+shared arch=linux-centos7-x86_64
        ^[email protected]%[email protected]~doc+ncurses+openssl+ownlibs~qt build_type=Release arch=linux-centos7-x86_64
            ^[email protected]%[email protected]~docs certs=system arch=linux-centos7-x86_64
        ^[email protected]%[email protected]+bz2+ctypes+dbm~debug+libxml2+lzma~nis~optimizations+pic+pyexpat+pythoncmd+readline+shared+sqlite3+ssl~tix~tkinter~ucs4+uuid+zlib arch=linux-centos7-x86_64
        ^[email protected]%[email protected] arch=linux-centos7-x86_64

1. "%[email protected]:5" conflicts with "clingo-bootstrap" [C++14 support is required to bootstrap clingo]

    Please run `spack -d spec zlib` for more verbose error messages
[[email protected] ~]$ spack install python
==> Bootstrapping clingo from pre-built binaries
==> Bootstrapping clingo from sources
==> Error: cannot bootstrap the "clingo" Python module from spec "[email protected]+python %gcc target=x86_64" due to the following failures:
    'spack-install' raised ConflictsInSpecError: Conflicts in concretized spec "[email protected]%[email protected]~docs~ipo+python~static_libstdcpp build_type=Release arch=linux-centos7-x86_64/6hb2rkn"

    List of matching conflicts for spec:

    [email protected]%[email protected]~docs~ipo+python~static_libstdcpp build_type=Release arch=linux-centos7-x86_64
        ^[email protected]%[email protected] arch=linux-centos7-x86_64
            ^[email protected]%[email protected] arch=linux-centos7-x86_64
                ^[email protected]%[email protected] libs=shared,static arch=linux-centos7-x86_64
            ^[email protected]%[email protected]+sigsegv patches=9dc5fbd0d5cb1037ab1e6d0ecc74a30df218d0a94bdd5a02759a97f62daca573,bfdffa7c2eb01021d5849b36972c069693654ad826c1a20b53534009a4ec7a89 arch=linux-centos7-x86_64
                ^[email protected]%[email protected] arch=linux-centos7-x86_64
            ^[email protected]%[email protected]+cpanm+shared+threads arch=linux-centos7-x86_64
                ^[email protected]%[email protected]+cxx~docs+stl patches=b231fcc4d5cff05e5c3a4814f6a5af0e9a966428dc2176540d2c05aff41de522 arch=linux-centos7-x86_64
                ^[email protected]%[email protected]~debug~pic+shared arch=linux-centos7-x86_64
                ^[email protected]%[email protected] arch=linux-centos7-x86_64
                    ^[email protected]%[email protected] arch=linux-centos7-x86_64
                        ^[email protected]%[email protected]~symlinks+termlib abi=none arch=linux-centos7-x86_64
                            ^[email protected]%[email protected] arch=linux-centos7-x86_64
                ^[email protected]%[email protected]+optimize+pic+shared arch=linux-centos7-x86_64
        ^[email protected]%[email protected]~doc+ncurses+openssl+ownlibs~qt build_type=Release arch=linux-centos7-x86_64
            ^[email protected]%[email protected]~docs certs=system arch=linux-centos7-x86_64
        ^[email protected]%[email protected]+bz2+ctypes+dbm~debug+libxml2+lzma~nis~optimizations+pic+pyexpat+pythoncmd+readline+shared+sqlite3+ssl~tix~tkinter~ucs4+uuid+zlib arch=linux-centos7-x86_64
        ^[email protected]%[email protected] arch=linux-centos7-x86_64

1. "%[email protected]:5" conflicts with "clingo-bootstrap" [C++14 support is required to bootstrap clingo]

    Please run `spack -d spec zlib` for more verbose error messages

According to the error message, I need a compiler that supports C++14. I installed a new version of gcc/11.2.0 and added its bin directory to the PATH variable.

[[email protected] ~]$ setenv PATH /tools/oss/gcc/11.2.0/bin:$PATH
[[email protected] ~]$ spack -d spec zlib %[email protected]
==> [2022-05-24-10:03:13.206293] Imported spec from built-in commands
==> [2022-05-24-10:03:13.211112] Imported spec from built-in commands
Input spec
--------------------------------
zlib%[email protected]

Concretized
--------------------------------
==> [2022-05-24-10:03:13.222579] Reading config file /tools/oss/spack-0.17.2/etc/spack/defaults/config.yaml
==> [2022-05-24-10:03:13.298617] Reading config file /tools/oss/spack-0.17.2/etc/spack/defaults/bootstrap.yaml
==> [2022-05-24-10:03:13.333346] Reading config file /tools/oss/spack-0.17.2/etc/spack/defaults/config.yaml
==> [2022-05-24-10:03:13.387447] DATABASE LOCK TIMEOUT: 3s
==> [2022-05-24-10:03:13.387643] PACKAGE LOCK TIMEOUT: No timeout
==> [2022-05-24-10:03:13.388771] Reading config file /tools/oss/spack-0.17.2/etc/spack/defaults/bootstrap.yaml
==> [2022-05-24-10:03:13.412265] DATABASE LOCK TIMEOUT: 3s
==> [2022-05-24-10:03:13.412528] PACKAGE LOCK TIMEOUT: No timeout
==> [2022-05-24-10:03:13.412772] [BOOTSTRAP CONFIG SCOPE] name=_builtin
==> [2022-05-24-10:03:13.413841] [BOOTSTRAP CONFIG SCOPE] name=defaults, path=/tools/oss/spack-0.17.2/etc/spack/defaults
==> [2022-05-24-10:03:13.413961] [BOOTSTRAP CONFIG SCOPE] name=defaults/linux, path=/tools/oss/spack-0.17.2/etc/spack/defaults/linux
==> [2022-05-24-10:03:13.414080] [BOOTSTRAP CONFIG SCOPE] name=bootstrap, path=/home/tools_adm/.spack/bootstrap/config
==> [2022-05-24-10:03:13.414180] [BOOTSTRAP CONFIG SCOPE] name=bootstrap/linux, path=/home/tools_adm/.spack/bootstrap/config/linux
==> [2022-05-24-10:03:13.416454] Reading config file /home/tools_adm/.spack/bootstrap/config/linux/compilers.yaml
==> [2022-05-24-10:03:13.504704] [BOOTSTRAP ROOT SPEC] [email protected]+python %gcc target=x86_64
==> [2022-05-24-10:03:13.504904] [BOOTSTRAP MODULE clingo] Try importing from Python
==> [2022-05-24-10:03:13.505664] Reading config file /tools/oss/spack-0.17.2/etc/spack/defaults/bootstrap.yaml
==> [2022-05-24-10:03:13.533487] Bootstrapping clingo from pre-built binaries
==> [2022-05-24-10:03:13.539614] Reading config file /tools/oss/spack-0.17.2/etc/spack/defaults/config.yaml
==> [2022-05-24-10:03:13.602270] DATABASE LOCK TIMEOUT: 3s
==> [2022-05-24-10:03:13.602520] PACKAGE LOCK TIMEOUT: No timeout
==> [2022-05-24-10:03:13.656899] Reading config file /tools/oss/spack-0.17.2/etc/spack/defaults/mirrors.yaml
==> [2022-05-24-10:03:14.404023] Cached index for https://mirror.spack.io/bootstrap/github-actions/v0.1 already up to date
==> [2022-05-24-10:03:14.477810] Imported buildcache from built-in commands
==> [2022-05-24-10:03:14.502955] Imported buildcache from built-in commands
==> [2022-05-24-10:05:40.274042] Reading config file /tools/oss/spack-0.17.2/etc/spack/defaults/config.yaml
==> [2022-05-24-10:05:40.351266] Reading config file /home/tools_adm/.spack/bootstrap/config/linux/config.yaml
==> [2022-05-24-10:05:40.627291] [BOOTSTRAP MODULE clingo] The installed spec "[email protected]+python %gcc target=x86_64 ^[email protected] /vcipwnf57slgoo7busvvkzjkk7vydeb5" provides the "clingo" Python module
==> [2022-05-24-10:05:40.691909] Reading config file /tools/oss/spack-0.17.2/etc/spack/defaults/repos.yaml
==> [2022-05-24-10:05:40.876049] Reading config file /home/tools_adm/.spack/linux/compilers.yaml
==> [2022-05-24-10:05:40.914061] Reading config file /tools/oss/spack-0.17.2/etc/spack/defaults/config.yaml
==> [2022-05-24-10:05:40.969529] Reading config file /tools/oss/spack-0.17.2/etc/spack/defaults/packages.yaml
==> [2022-05-24-10:05:41.244816] build(zlib)
[email protected]%[email protected]+optimize+pic+shared arch=linux-centos7-sandybridge

Problem-solving.

Done.

Read More: