Distribution packages are available for Ubuntu, Debian, CentOS / Red Hat, Fedora and Arch Linux. Binaries for other operating systems are available on the releases page. For the future, we have plans to support more OSes.
Binary packages are signed with this signing key.
Note: Due to specific Windows limitations, some temporary workarounds may be required. It is strongly advised to set your STACK_ROOT
environment variable similarly to your root (e.g., set STACK_ROOT=c:\stack_root
) before running stack
.
- Download the latest release. Note: while generally i386/32-bit GHC is better tested on Windows, there are reports that recent versions of Windows only work with the 64-bit version of stack (see issue #393).
- Unpack the archive and place
stack.exe
somewhere on your%PATH%
(see Path section below) and you can then runstack
on the command line. - Now you can run
stack
from the terminal.
NOTE: These executables have been built and tested on a Windows 7, 8.1, and 10 64-bit machines. They should run on older Windows installs as well, but have not been tested. If you do test, please edit and update this page to indicate as such.
- Download the latest release
- Extract the archive and place
stack
somewhere on your$PATH
(see Path section below) - Now you can run
stack
from the terminal.
We generally test on the current version of OS X, but stack is known to work on Mavericks as well, and may also work on older versions (YMMV).
note: for 32-bit, use the generic Linux option
-
Get the FP Complete key:
wget -q -O- https://s3.amazonaws.com/download.fpcomplete.com/ubuntu/fpco.key | sudo apt-key add -
-
Add the appropriate source repository:
-
Ubuntu 15.10 (amd64):
echo 'deb http://download.fpcomplete.com/ubuntu/wily stable main'|sudo tee /etc/apt/sources.list.d/fpco.list
-
Ubuntu 15.04 (amd64):
echo 'deb http://download.fpcomplete.com/ubuntu/vivid stable main'|sudo tee /etc/apt/sources.list.d/fpco.list
-
Ubuntu 14.10 (amd64)
echo 'deb http://download.fpcomplete.com/ubuntu/utopic stable main'|sudo tee /etc/apt/sources.list.d/fpco.list
-
Ubuntu 14.04 (amd64)
echo 'deb http://download.fpcomplete.com/ubuntu/trusty stable main'|sudo tee /etc/apt/sources.list.d/fpco.list
-
Ubuntu 12.04 (amd64)
echo 'deb http://download.fpcomplete.com/ubuntu/precise stable main'|sudo tee /etc/apt/sources.list.d/fpco.list
-
-
Update apt and install
sudo apt-get update && sudo apt-get install stack -y
note: for 32-bit, use the generic Linux option
-
Get the FP Complete key:
wget -q -O- https://s3.amazonaws.com/download.fpcomplete.com/debian/fpco.key | sudo apt-key add -
-
Add the appropriate source repository:
-
Debian 8 (amd64):
echo 'deb http://download.fpcomplete.com/debian/jessie stable main'|sudo tee /etc/apt/sources.list.d/fpco.list
-
Debian 7 (amd64)
echo 'deb http://download.fpcomplete.com/debian/wheezy stable main'|sudo tee /etc/apt/sources.list.d/fpco.list
-
-
Update apt and install
sudo apt-get update && sudo apt-get install stack -y
note: for 32-bit, use the generic Linux option
-
Add the appropriate source repository:
-
CentOS 7 / RHEL 7 (x86_64)
curl -sSL https://s3.amazonaws.com/download.fpcomplete.com/centos/7/fpco.repo | sudo tee /etc/yum.repos.d/fpco.repo
-
CentOS 6 / RHEL 6 (x86_64)
curl -sSL https://s3.amazonaws.com/download.fpcomplete.com/centos/6/fpco.repo | sudo tee /etc/yum.repos.d/fpco.repo
-
-
Install:
sudo yum -y install stack
note: for 32-bit, you can use this Fedora Copr repo which can be enabled with:
sudo dnf copr enable petersen/stack
-
Add the appropriate source repository:
-
Fedora 22 (x86_64)
curl -sSL https://s3.amazonaws.com/download.fpcomplete.com/fedora/22/fpco.repo | sudo tee /etc/yum.repos.d/fpco.repo
-
Fedora 21 (x86_64)
curl -sSL https://s3.amazonaws.com/download.fpcomplete.com/fedora/21/fpco.repo | sudo tee /etc/yum.repos.d/fpco.repo
-
-
Install:
-
Fedora 22+
sudo dnf -y install stack
-
Fedora < 22
sudo yum -y install stack
-
note: for 32-bit, use the generic Linux option. (You will need to ensure libtinfo is installed, see below.)
stack can be found in the AUR:
- haskell-stack latest stable version
- haskell-stack-git git version
In order to install stack from Hackage or from source, you will need the libtinfo Arch Linux package installed. If this package is not installed, stack will not be able to install GHC.
If you use the ArchHaskell repository, you can also get the haskell-stack
package from there.
Users who follow the nixos-unstable
channel or the Nixpkgs master
branch can install the latest stack
release into their profile by running:
nix-env -f "<nixpkgs>" -iA haskellPackages.stack
Alternatively, the package can be built from source as follows.
-
Clone the git repo:
git clone https://github.com/commercialhaskell/stack.git
-
Create a
shell.nix
file:cabal2nix --shell ./. --no-check --no-haddock > shell.nix
Note that the tests fail on NixOS, so disable them with
--no-check
. Also, haddock currently doesn't work for stack, so--no-haddock
disables it. -
Install stack to your user profile:
nix-env -i -f shell.nix
For more information on using Stack together with Nix, please see the NixOS manual section on Stack.
(64-bit and 32-bit options available)
- Download the latest release. Note: the
-gmp4
variants are for older distributions (such as CentOS 6.x) that only include libgmp4 (libgmp.so.3). - Extract the archive and place
stack
somewhere on your$PATH
(see Path section below) - Now you can run
stack
from the terminal.
Tested on Fedora 20: make sure to install the following packages sudo yum install perl make automake gcc gmp-devel
.
For Gentoo users, make sure to have the ncurses
package with USE=tinfo
(without it, stack will not be able to install GHC).
You can install stack by copying it anywhere on your PATH environment variable. We recommend installing in the same directory where stack itself will install executables (that way stack is able to upgrade itself!). On Windows, that directory is %APPDATA%\local\bin
, e.g. "c:\Users\Michael\AppData\Roaming\local\bin". For other systems, use $HOME/.local/bin
.
If you don't have that directory in your PATH, you may need to update your PATH (such as by editing .bashrc).
If you're curious about the choice of these paths, see issue #153
There are essentially three different approaches to upgrade:
- If you're using a package manager (e.g., the Ubuntu debs listed above) and are happy with sticking with the officially released binaries, simply follow your normal package manager strategies for upgrading (e.g.
apt-get update && apt-get upgrade
). - If you're not using a package manager but want to stick with the official binaries (such as on Windows or Mac), you'll need to manually follow the steps above to download the newest binaries from the release page and replace the old binary.
- The
stack
tool itself ships with anupgrade
command, which will buildstack
from source and install it to the default install path (see the previous section). You can usestack upgrade
to get the latest official release, andstack upgrade --git
to install from Git and live on the bleeding edge. If you follow this, make sure that this directory is on yourPATH
and takes precedence over the system installedstack
. For more information, see this discussion.