Debian Codegraph @

docs/content/en/_common/installation/04-build-from-source.md

raw
1 ---
2 _comment: Do not remove front matter.
3 ---
4
5 ## Build from source
6
7 To build Hugo from source you must install:
8
9 1. [Git][]
10 1. [Go][] version {{% current-go-version %}} or later
11
12 ### Standard edition
13
14 To build and install the standard edition:
15
16 ```sh
17 CGO_ENABLED=0 go install github.com/gohugoio/hugo@latest
18 ```
19
20 ### Deploy edition
21
22 {{< new-in v0.159.2 />}}
23
24 To build and install the deploy edition:
25
26 ```sh
27 CGO_ENABLED=0 go install -tags withdeploy github.com/gohugoio/hugo@latest
28 ```
29
30 ### Extended edition
31
32 To build and install the extended edition, first install a C compiler such as [GCC][] or [Clang][] and then run the following command:
33
34 ```sh
35 CGO_ENABLED=1 go install -tags extended github.com/gohugoio/hugo@latest
36 ```
37
38 ### Extended/deploy edition
39
40 To build and install the extended/deploy edition, first install a C compiler such as [GCC][] or [Clang][] and then run the following command:
41
42 ```sh
43 CGO_ENABLED=1 go install -tags extended,withdeploy github.com/gohugoio/hugo@latest
44 ```
45
46 [Clang]: https://clang.llvm.org/
47 [GCC]: https://gcc.gnu.org/
48 [Git]: https://git-scm.com/book/en/v2/Getting-Started-Installing-Git
49 [Go]: https://go.dev/doc/install