Spack Prerequisites

Spack relies on a few basic utilities to be present on the system where it runs, depending on the operating system. To install them, follow the instructions below.

Linux

For Debian and Ubuntu users:

$ apt update
$ apt install file bzip2 ca-certificates g++ gcc gfortran git gzip lsb-release patch python3 tar unzip xz-utils zstd

For RHEL, AlmaLinux, and Rocky Linux users:

$ dnf install epel-release
$ dnf install file bzip2 ca-certificates git gzip patch python3 tar unzip xz zstd gcc gcc-c++ gcc-gfortran

macOS

On macOS, the Command Line Tools package is required, and the full Xcode suite may be necessary for some packages, such as Qt and apple-gl. To install Xcode, you can use the following command:

$ xcode-select --install

For most packages, the Xcode command-line tools are sufficient. However, some packages like qt require the full Xcode suite. You can check to see which you have installed by running:

$ xcode-select -p

If the output is:

/Applications/Xcode.app/Contents/Developer

you already have the full Xcode suite installed. If the output is:

/Library/Developer/CommandLineTools

you only have the command-line tools installed. The full Xcode suite can be installed through the App Store. Make sure to launch the Xcode application and accept the license agreement before using Spack. It may ask you to install additional components. Alternatively, the Xcode license can be accepted through the command line:

$ sudo xcodebuild -license accept