« AsciiDoc Tips and Fragments Linux Package Management »

# Installing Extended HugoUpdated  2022-September-18

## News

Ongoing  According to Repology, the latest packaged Hugo is version . To keep up with Hugo releases, see github.com/gohugoio/hugo/releases, discourse.gohugo.io/c/announcements, or twitter.com/@GoHugoIO.

2022-February-13  Published this evolving⁠[1] article.

## Prerequisites

 ℹ Extended Hugo is needed if…you use Hugo’s built-in libsass to convert a SASS or SCSS file to a CSS file,or you use Hugo to convert an image to WebP format.Infinite Ink’s Hugo Tutorial and many Hugo themes require extended Hugo.

## 1. Find out your path

The hugo executable is one⁠[2] file and can be put anywhere on your path. To find out your path, run one of the following commands at a command-line prompt.

• In a Unix-like shell, including Git Bash, run:

• echo $PATH • In PowerShell, run either of the following: • $env:path

• \$env:path -split ";"

• In cmd.exe,⁠[3] run:

• set path

 💡 If you use a package manager to install hugo or hugo.exe, you will not need to deal with your path because the package manager will take care of that.

## 2. Install extended hugo

You can install extended Hugo with a package manager or manually.

 ‼ If you are not a superuser, using a package manager is the way to go IMHO.

### Method 1: Install manually

1. hugo_version_checksums.txt, for example:

• hugo_0.104.1_checksums.txt

2. hugo_extended_version_platform.extension, for example one of these:

• hugo_extended_0.104.1_darwin-universal.tar.gz

• hugo_extended_0.104.1_Linux-64bit.deb[4]

• hugo_extended_0.104.1_Linux-64bit.tar.gz

• hugo_extended_0.104.1_linux-amd64.deb

• hugo_extended_0.104.1_linux-amd64.tar.gz

• hugo_extended_0.104.1_linux-arm64.deb

• hugo_extended_0.104.1_linux-arm64.tar.gz

• hugo_extended_0.104.1_windows-amd64.zip

Then, check the checksum of the hugo package you downloaded, unpackage it,⁠[4][5] and put the hugo or hugo.exe executable somewhere on your path (discussed above).

 💡 On a Unix-like system, a reasonable place to put hugo is /usr/local/bin (because often this directory exists and is on your path).On Windows, a reasonable place to put hugo.exe is C:\Windows (because usually this directory exists and is on your path).Note that putting a file in either /usr/local/bin or C:\Windows usually requires admin privileges.

### Method 2: Install with a package manager

The guide at gohugo.io/getting-started/installing/ describes how to use a lot of Linux, Mac, and Windows package managers.

#### My Windows choice: Scoop

On Windows I use this sequence of commands to install extended Hugo:

scoop update
scoop install hugo-extended

And this sequence of commands to update extended Hugo:

scoop update
scoop update hugo-extended

To find out what version of Hugo is currently installed by Scoop, see github.com/ScoopInstaller/Main/​blob/master/bucket/hugo-extended.json or this Repology badge:

#### My Linux choices

To learn about Linux package management in general, see Infinite Ink’s Linux Package Management.

##### Snap Store Desktop App

On Linux with a desktop environment, I use the Snap Store Desktop App because…

1. it has a graphical user interface,

3. it’s easy to specify an extended channel because there is a drop-⁠down menu in the upper right of the app window labeled Source that lets you choose extended/stable or, if available, extended/edge.

Details about what Hugo version the Snap Store is currently installing are at snapcraft.io/hugo and in the following embedded card.

 ℹ Starting 2021-October-25, the Hugo team has the option to have the Snap Store install Hugo with classic (rather than strict) confinement. Details about this are in the discussion about Request for classic confinement for hugo snap on forum.snapcraft.io. To find out the current confinement level, see github.com/gohugoio/hugo/​blob/master/snap/snapcraft.yaml.

##### Homebrew on Linux

If you have installed Homebrew on Linux, the following command installs extended Hugo.

brew install hugo

#### macOS

The brew install hugo command in the previous section also works on macOS.

## 3. Check your hugo with the hugo version and hugo env -v commands

After you install hugo, check that it’s on your path and is an extended version, by running this at a command-line prompt:

hugo version

You should see something like this:

hugo v0.104.1-8958b8741f552c8024af5194330fbf031544a826+extended windows/amd64 BuildDate=2022-09-26T17:05:45Z VendorInfo=gohugoio
👆

To view a lot more information about your hugo, run either of these:

hugo env -v
hugo env --verbose

Here is an example of the output of these equivalent commands:

  1hugo v0.103.1-b665f1e8f16bf043b9d3c087a60866159d71b48d+extended windows/amd64 BuildDate=2022-09-18T13:19:01Z VendorInfo=gohugoio
2GOOS="windows"
3GOARCH="amd64"
4GOVERSION="go1.19"
9github.com/Azure/azure-pipeline-go="v0.2.3"
10github.com/Azure/azure-storage-blob-go="v0.14.0"
12github.com/Azure/go-autorest/autorest/date="v0.3.0"
13github.com/Azure/go-autorest/autorest="v0.11.20"
14github.com/Azure/go-autorest/logger="v0.2.1"
15github.com/Azure/go-autorest/tracing="v0.6.0"
16github.com/BurntSushi/locker="v0.0.0-20171006230638-a6e239ea1c69"
17github.com/PuerkitoBio/purell="v1.1.1"
19github.com/alecthomas/chroma/v2="v2.2.0"
21github.com/aws/aws-sdk-go-v2/config="v1.7.0"
22github.com/aws/aws-sdk-go-v2/credentials="v1.4.0"
23github.com/aws/aws-sdk-go-v2/feature/ec2/imds="v1.5.0"
24github.com/aws/aws-sdk-go-v2/internal/ini="v1.2.2"
25github.com/aws/aws-sdk-go-v2/service/internal/presigned-url="v1.3.0"
26github.com/aws/aws-sdk-go-v2/service/sso="v1.4.0"
27github.com/aws/aws-sdk-go-v2/service/sts="v1.7.0"
28github.com/aws/aws-sdk-go-v2="v1.9.0"
29github.com/aws/aws-sdk-go="v1.43.5"
30github.com/aws/smithy-go="v1.8.0"
31github.com/bep/clock="v0.3.0"
32github.com/bep/debounce="v1.2.0"
33github.com/bep/gitmap="v1.1.2"
34github.com/bep/goat="v0.5.0"
35github.com/bep/godartsass="v0.14.0"
36github.com/bep/golibsass="v1.1.0"
37github.com/bep/gowebp="v0.1.0"
38github.com/bep/overlayfs="v0.6.0"
39github.com/bep/tmc="v0.5.1"
40github.com/clbanning/mxj/v2="v2.5.6"
41github.com/cli/safeexec="v1.0.0"
42github.com/cpuguy83/go-md2man/v2="v2.0.2"
44github.com/dlclark/regexp2="v1.4.0"
45github.com/dustin/go-humanize="v1.0.0"
46github.com/evanw/esbuild="v0.15.7"
47github.com/frankban/quicktest="v1.14.3"
48github.com/fsnotify/fsnotify="v1.5.4"
49github.com/getkin/kin-openapi="v0.100.0"
50github.com/ghodss/yaml="v1.0.0"
51github.com/go-openapi/jsonpointer="v0.19.5"
52github.com/go-openapi/swag="v0.19.5"
53github.com/gobuffalo/flect="v0.3.0"
54github.com/gobwas/glob="v0.2.3"
55github.com/gohugoio/go-i18n/v2="v2.1.3-0.20210430103248-4c28c89f8013"
56github.com/gohugoio/locales="v0.14.0"
57github.com/gohugoio/localescompressed="v1.0.1"
58github.com/golang-jwt/jwt/v4="v4.0.0"
59github.com/golang/groupcache="v0.0.0-20210331224755-41bb18bfe9da"
60github.com/golang/protobuf="v1.5.2"
66github.com/gorilla/websocket="v1.5.0"
67github.com/hairyhenderson/go-codeowners="v0.2.3-0.20201026200250-cdc7c0759690"
68github.com/inconshreveable/mousetrap="v1.0.0"
69github.com/invopop/yaml="v0.1.0"
70github.com/jdkato/prose="v1.2.1"
71github.com/jmespath/go-jmespath="v0.4.0"
72github.com/kr/pretty="v0.3.0"
73github.com/kr/text="v0.2.0"
74github.com/kyokomi/emoji/v2="v2.2.10"
75github.com/mailru/easyjson="v0.0.0-20190626092158-b2ccc519800e"
76github.com/mattn/go-ieproxy="v0.0.1"
77github.com/mattn/go-isatty="v0.0.16"
78github.com/mattn/go-runewidth="v0.0.9"
79github.com/mitchellh/hashstructure="v1.1.0"
80github.com/mitchellh/mapstructure="v1.5.0"
81github.com/muesli/smartcrop="v0.3.0"
82github.com/niklasfasching/go-org="v1.6.5"
83github.com/olekukonko/tablewriter="v0.0.5"
84github.com/pelletier/go-toml/v2="v2.0.4"
85github.com/rogpeppe/go-internal="v1.9.0"
86github.com/russross/blackfriday/v2="v2.1.0"
87github.com/rwcarlsen/goexif="v0.0.0-20190401172101-9e8deecbddbd"
88github.com/sanity-io/litter="v1.5.5"
89github.com/sass/libsass="3.6.5"
90github.com/spf13/afero="v1.9.2"
91github.com/spf13/cast="v1.5.0"
92github.com/spf13/cobra="v1.5.0"
93github.com/spf13/fsync="v0.9.0"
94github.com/spf13/jwalterweatherman="v1.1.0"
95github.com/spf13/pflag="v1.0.5"
96github.com/tdewolff/minify/v2="v2.12.1"
97github.com/tdewolff/parse/v2="v2.6.3"
98github.com/webmproject/libwebp="v1.2.0"
99github.com/yuin/goldmark="v1.4.14"
100go.opencensus.io="v0.23.0"
101go.uber.org/atomic="v1.10.0"
102gocloud.dev="v0.24.0"
103golang.org/x/crypto="v0.0.0-20211108221036-ceb1ce70b4fa"
104golang.org/x/image="v0.0.0-20211028202545-6944b10bf410"
105golang.org/x/net="v0.0.0-20220607020251-c690dde0001d"
106golang.org/x/oauth2="v0.0.0-20220411215720-9780585627b5"
107golang.org/x/sync="v0.0.0-20210220032951-036812b2e83c"
108golang.org/x/sys="v0.0.0-20220811171246-fbc7d0a398ab"
109golang.org/x/text="v0.3.7"
110golang.org/x/tools="v0.1.11"
111golang.org/x/xerrors="v0.0.0-20220411194840-2f41105eb62f"
116gopkg.in/yaml.v2="v2.4.0"
117gopkg.in/yaml.v3="v3.0.1"

Line 89 (libsass) is emphasized because it’s a dependency that is part of extended Hugo, but not unextended Hugo. libsass is required by the TGIH website that’s created in the Infinite Ink Hugo Tutorial.

## 4. Locate hugo

To find out which directory the hugo executable is in, run one of the following shell commands.

• In a Unix-like shell, run:

• which hugo

• In PowerShell, run:

• gcm hugo (or equivalently Get-Command hugo)

• In cmd.exe or Git Bash, run:

• where hugo

## Possible next steps

After you’ve installed extended Hugo, you might want to follow the steps in one or both of these Infinite Ink articles:

## Repology

As you can see in the above Repology badge, most package managers do not install the newest version of Hugo. This is the main reason I wrote this article.⁠

## Endnotes

1. Many Infinite Ink articles, including this one, are evergreen and regularly updated.
2. If you use Hugo modules, you need to install go and git (or another VCS). If you use a non-⁠built-⁠in renderer, such as asciidoctor or pandoc, you need to install that renderer and edit Hugo’s security configuration.
3. cmd.exe is also known as CMD and is pronounced “cee em dee.” It is sometimes referred to as the “Command Prompt” (which is a completely ambiguous name IMHO). Details are at Wikipedia’s cmd.exe.
4. On a Debian-based system, the command sudo dpkg -⁠-⁠install ./hugo_extended_0.104.1_Linux-64bit.deb will work if you invoke it from the directory that the .deb is in. Since hugo has no dependencies, there should be no issues installing it with dpkg -⁠-⁠install. (This is how I install hugo on WSL, which is also known as “Windows’ Subsystem for Linux” and “Bash on Ubuntu on Windows.”)
5. On most GUI systems, double clicking the downloaded .zip or .tar.gz will launch an unzip app. For example, some Linux distributions launch the ark archiving tool.
6. “Binary” is another word for executable.