@@ -53,18 +53,20 @@ GitHub repository.
53
53
54
54
=== "x86_64"
55
55
56
- * Download the latest release:
56
+ * Click
57
+ [:material-cloud-download-outline:](https://get.haskellstack.org/stable/linux-x86_64.tar.gz)
58
+ to download an archive file with the latest release.
57
59
58
- * [Linux 64-bit (static)](https://get.haskellstack.org/stable/linux-x86_64.tar.gz)
60
+ * Extract the archive and place the `stack` executable somewhere on your
61
+ PATH (see the [Path](#path) section below).
59
62
60
- * Extract the archive and place `stack` somewhere on your PATH (see the
61
- [Path](#path) section below).
62
-
63
- * Ensure you have required system dependencies installed. These include GCC, GNU
64
- Make, xz, perl, libgmp, libffi, and zlib. We also recommend Git and GPG.
63
+ * Ensure you have the required system dependencies installed. These
64
+ include GCC, GNU Make, xz, perl, libgmp, libffi, and zlib. We also
65
+ recommend Git and GPG.
65
66
66
67
The installation of system dependencies will depend on the package
67
- manager for your Linux distribution.
68
+ manager for your Linux distribution. Notes are provided for Arch Linux,
69
+ CentOS, Debian, Fedora, Gentoo and Ubuntu.
68
70
69
71
=== "Arch Linux"
70
72
@@ -107,10 +109,18 @@ GitHub repository.
107
109
including Arch Linux, Debian, Fedora, NixOS, openSUSE/SUSE Linux Enterprise,
108
110
and Ubuntu.
109
111
112
+ !!! info "Linux packages that lag behind Stack's current version"
113
+
114
+ The Stack version available as a Linix package may lag behind Stack's
115
+ current version. If so, using `stack upgrade --binary-only` is
116
+ recommended after installing it. For Stack versions before 1.3.0 which
117
+ do not support `--binary-only`, just `stack upgrade` may work too.
118
+
110
119
=== "Arch Linux"
111
120
112
- The Arch community respository provides an official package. You can
113
- install it with the command:
121
+ The Arch community package respository provides an official
122
+ [package](ttps://www.archlinux.org/packages/community/x86_64/stack/).
123
+ You can install it with the command:
114
124
115
125
~~~text
116
126
sudo pacman -S stack
@@ -120,32 +130,28 @@ GitHub repository.
120
130
the day. The package is also always rebuilt and updated when one of its
121
131
dependencies gets an update.
122
132
123
- - [stack](https://www.archlinux.org/packages/community/x86_64/stack/) _latest stable version_
124
- - [haskell-stack-git](https://aur.archlinux.org/packages/haskell-stack-git/) _git version_
133
+ The Arch User Repository (AUR) also provides a
134
+ [package](https://aur.archlinux.org/packages/haskell-stack-git).
135
+ However, its Stack version lags behind, so running
136
+ `stack upgrade --binary-only` is recommended after installing it. For
137
+ older Stack versions which do not support `--binary-only`, just
138
+ `stack upgrade` may work too.
125
139
126
- In order to use `stack setup` with older versions of GHC or on a 32-bit
127
- system, you may need the
140
+ To use `stack setup` with versions of GHC before 7.10.3 or on a
141
+ 32-bit system, you may need the AUR
128
142
[ncurses5-compat-libs](https://aur.archlinux.org/packages/ncurses5-compat-libs/)
129
- AUR package installed. If this package is not installed, Stack may not be
130
- able to install older (< 7.10.3) or 32-bit GHC versions.
131
-
132
- If you use the
133
- [ArchHaskell repository](https://wiki.archlinux.org/index.php/ArchHaskell),
134
- you can also get the `haskell-stack-tool` package from there.
143
+ package installed.
135
144
136
145
=== "Debian"
137
146
138
147
There are Debian
139
148
[packages](https://packages.debian.org/search?keywords=haskell-stack&searchon=names&suite=all§ion=all)
140
149
for Stretch and up. However, the distribution's Stack version lags
141
- behind, so running `stack upgrade --binary-only` is recommended after
142
- installing it. For older Stack versions which do not support
143
- `--binary-only`, just `stack upgrade` may work too.
150
+ behind.
144
151
145
152
=== "Fedora"
146
153
147
- Fedora includes builds of Stack, but the version may lag behind, so we
148
- recommend running `stack upgrade` after installing it.
154
+ Fedora includes Stack, but its Stack version may lag behind.
149
155
150
156
=== "NixOS"
151
157
@@ -184,53 +190,45 @@ GitHub repository.
184
190
For more information on using Stack together with Nix, please see the
185
191
[NixOS manual section on Stack](http://nixos.org/nixpkgs/manual/#how-to-build-a-haskell-project-using-stack).
186
192
187
- === "openSUSE/SUSE Linux Enterprise"
188
-
189
- There is also an unofficial SUSE package. This Stack version may lag
190
- behind, so we recommend running `stack upgrade` after installing it.
191
- To install it:
192
-
193
- 1. Add the appropriate OBS repository:
193
+ === "SUSE"
194
194
195
- * openSUSE Tumbleweed
195
+ There is also an unofficial package for openSUSE or SUSE Linux
196
+ Enterprise. Its Stack version may lag behind. To install it:
196
197
197
- all needed is in distribution
198
+ === openSUSE Tumbleweed
198
199
199
- * openSUSE Leap
200
-
201
- ~~~text
202
- sudo zypper ar http://download.opensuse.org/repositories/devel:/languages:/haskell/openSUSE_Leap_42.1/devel:languages:haskell.repo
203
- ~~~
200
+ ~~~text
201
+ sudo zypper in stack
202
+ ~~~
204
203
205
- * SUSE Linux Enterprise 12
204
+ === openSUSE Leap
206
205
207
- ~~~text
208
- sudo zypper ar http://download.opensuse.org/repositories/devel:/languages:/haskell/SLE_12/devel:languages:haskell.repo
209
- ~~~
206
+ ~~~text
207
+ sudo zypper ar http://download.opensuse.org/repositories/devel:/languages:/haskell/openSUSE_Leap_42.1/devel:languages:haskell.repo
208
+ sudo zypeer in stack
209
+ ~~~
210
210
211
- 2. Install:
211
+ === SUSE Linux Enterprise 12
212
212
213
213
~~~text
214
- sudo zypper in stack
214
+ sudo zypper ar http://download.opensuse.org/repositories/devel:/languages:/haskell/SLE_12/devel:languages:haskell.repo
215
+ sude zypper in stack
215
216
~~~
216
217
217
218
=== "Ubuntu"
218
219
219
220
There are Ubuntu
220
221
[packages](http://packages.ubuntu.com/search?keywords=haskell-stack&searchon=names&suite=all§ion=all)
221
222
for Ubuntu 18.04 and up. However, the distribution's Stack version lags
222
- behind, so we recommend running `stack upgrade --binary-only` after
223
- installing it. For older Stack versions which do not support
224
- `--binary-only`, just `stack upgrade` may work too.
223
+ behind.
225
224
226
225
It is possible to set up auto-completion of Stack commands. For further
227
226
information, see the [shell auto-completion](shell_autocompletion.md)
228
227
documentation.
229
228
230
229
=== "macOS"
231
230
232
- For most Linux distributions, the easiest way to install Stack is to
233
- command:
231
+ The easiest way to install Stack is to command:
234
232
235
233
~~~text
236
234
curl -sSL https://get.haskellstack.org/ | sh
@@ -250,15 +248,18 @@ GitHub repository.
250
248
to `/usr/local/bin`. If you prefer more control, follow the manual
251
249
installation instructions below.
252
250
253
- We generally test on the current version of macOS and do our best to keep it
254
- compatible with the three most recent major versions. Stack may also work on
255
- older versions.
251
+ !!! info
256
252
257
- ### Manual download
253
+ We generally test on the current version of macOS and do our best to
254
+ keep it compatible with the three most recent major versions. Stack may
255
+ also work on older versions.
258
256
259
- * Download the latest release:
257
+ ### Manual download
260
258
261
- * [macOS 64-bit](https://get.haskellstack.org/stable/osx-x86_64.tar.gz)
259
+ * Click
260
+ [:material-cloud-download-outline:](https://get.haskellstack.org/stable/osx-x86_64.tar.gz)
261
+ to download an archive file with the latest release for x86_64
262
+ architectures.
262
263
263
264
* Extract the archive and place `stack` somewhere on your PATH (see the
264
265
[Path](#path) section below).
@@ -310,11 +311,11 @@ GitHub repository.
310
311
If you are on macOS 10.12 (Sierra) and encounter GHC panic while building, see
311
312
this [issue](https://github.com/commercialhaskell/stack/issues/2577)
312
313
313
- On Apple silicon chip (AArch64/ARM64) architectures, the installation of Stack
314
- or some packages (e.g. `network`) requiring C source compilation might fail with
315
- `configure: error: C compiler cannot build executables`. In that case you should
316
- pass `-arch arm64` as part of the `CFLAGS` environment variable. This setting
317
- will be picked up by the C compiler of your choice.
314
+ On Apple silicon chip (AArch64/ARM64) architectures, the installation of
315
+ Stack or some packages (e.g. `network`) requiring C source compilation might
316
+ fail with `configure: error: C compiler cannot build executables`. In that
317
+ case you should pass `-arch arm64` as part of the `CFLAGS` environment
318
+ variable. This setting will be picked up by the C compiler of your choice.
318
319
319
320
~~~bash
320
321
# Assuming BASH below
@@ -361,40 +362,58 @@ GitHub repository.
361
362
362
363
### Manual download
363
364
364
- * Download the latest release:
365
-
366
- * [64-bit Windows](https://get.haskellstack.org/stable/windows-x86_64.zip)
365
+ * Click
366
+ [:material-cloud-download-outline:](https://get.haskellstack.org/stable/windows-x86_64.zip)
367
+ to download an archive file with the latest release.
367
368
368
369
* Unpack the archive and place `stack.exe` somewhere on your PATH (see the
369
370
[Path](#path) section below).
370
371
371
372
* Now you can run Stack from the command line in a terminal.
372
373
374
+ !!! info
375
+
376
+ Stack can also be installed using the separate
377
+ [GHCup](https://www.haskell.org/ghcup/) installer for Haskell-related tools.
378
+ Unlike Stack, other build tools do not automatically install GHC. GHCup can
379
+ be used to install GHC for those other tools and Stack can be configured to
380
+ use the version of GHC that GHCup has installed.
381
+
373
382
## Path
374
383
375
384
You can install Stack by copying the executable file anywhere on your PATH. A
376
385
good place to install is the same directory where Stack itself will install
377
- executables. On Unix-like operating systems, that directory is :
386
+ executables, which depends on the operating system :
378
387
379
- ~~~ text
380
- $HOME/.local/bin
381
- ~~~
388
+ === "Unix-like"
382
389
383
- On Windows, that directory is :
390
+ Stack installs executables to :
384
391
385
- ~~~ text
386
- %APPDATA%\local\bin
387
- ~~~
392
+ ~~~text
393
+ $HOME/.local/bin
394
+ ~~~
395
+
396
+ If you don't have that directory in your PATH, you may need to update your
397
+ PATH. That can be done by editing the `~/.bashrc` file.
388
398
389
- For example: ` C:\Users\<user-name>\AppData\Roaming\local\bin ` .
399
+ === "Windows"
400
+
401
+ Stack installs executables to:
402
+
403
+ ~~~text
404
+ %APPDATA%\local\bin
405
+ ~~~
406
+
407
+ For example: `C:\Users\<user-name>\AppData\Roaming\local\bin`.
408
+
409
+ If you don't have that directory in your PATH, you may need to update your
410
+ PATH. That can be done by searching for 'Edit Environment variables for your
411
+ account' under Start.
390
412
391
413
If you don't have that directory in your PATH, you may need to update your PATH.
392
414
On Unix-like operating systems, that can be done by editing the ` ~/.bashrc `
393
415
file.
394
416
395
- If you're curious about the choice of these directories, see
396
- [ issue #153 ] ( https://github.com/commercialhaskell/stack/issues/153 )
397
-
398
417
## China-based users
399
418
400
419
If you're attempting to install Stack from within China:
@@ -437,19 +456,33 @@ package-indices:
437
456
438
457
To use Stack behind a HTTP proxy with IP address *IP* and port *PORT*, first set
439
458
up an environment variable `http_proxy` and then run the Stack command. For
440
- example, on Unix-like operating systems :
459
+ example :
441
460
442
- ~~~text
443
- export http_proxy=IP:PORT
444
- stack install
445
- ~~~
461
+ === "Unix-like"
462
+
463
+ ~~~text
464
+ export http_proxy=IP:PORT
465
+ stack install
466
+ ~~~
467
+
468
+ On most operating systems, it is not mandatory for programs to follow the
469
+ " system-wide" HTTP proxy. Some programs, such as browsers, do honor this
470
+ " system-wide" HTTP proxy setting, while other programs, including Bash, do
471
+ not. That means configuring "http proxy setting" in your System Preferences
472
+ (macOS) would not result in Stack traffic going through the proxy.
473
+
474
+ === "Windows"
475
+
476
+ ~~~text
477
+ $Env:http_proxy=IP:PORT
478
+ stack install
479
+ ~~~
446
480
447
- On most operating systems, it is not mandatory for programs to follow the
448
- "system-wide" HTTP proxy. Some programs, such as browsers, do honor this
449
- "system-wide" HTTP proxy setting, while other programs, including bash, do not.
450
- That means configuring "http proxy setting" in your Control Panel (Windows) or
451
- System Preferences (Mac) would not result in Stack traffic going through the
452
- proxy.
481
+ It is not mandatory for programs to follow the "system-wide" HTTP proxy.
482
+ Some programs, such as browsers, do honor this "system-wide" HTTP proxy
483
+ setting, while other programs do not. That means configuring
484
+ " http proxy setting" in your Control Panel would not result in Stack traffic
485
+ going through the proxy.
453
486
454
487
# # Upgrade Stack
455
488
0 commit comments