# Cannot create extended build on Linux

**URL:** <https://discourse.gohugo.io/t/cannot-create-extended-build-on-linux/25516>\
**Category:** Uncategorized\
**Created:** [May 14, 2020, 9:10am UTC](https://discourse.gohugo.io/t/cannot-create-extended-build-on-linux/25516 "2020-05-14T09:10:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dutchess\_Nicole](https://avatars.discourse-cdn.com/v4/letter/d/8baadc/32.png) [@Dutchess\_Nicole](https://discourse.gohugo.io/u/Dutchess_Nicole)\
**Post date:** [May 14, 2020, 9:10am UTC](https://discourse.gohugo.io/t/cannot-create-extended-build-on-linux/25516/1 "2020-05-14T09:10:46Z")

</div>

Hi, I’m trying to get the extended version to build on my PC but it won’t create the correct build

```auto
nicole@MintyNicole ~/Development/hugo-git $ git pull
remote: Enumerating objects: 16, done.
remote: Counting objects: 100% (16/16), done.
remote: Compressing objects: 100% (7/7), done.
remote: Total 16 (delta 7), reused 16 (delta 7), pack-reused 0
Unpacking objects: 100% (16/16), done.
From https://github.com/gohugoio/hugo
   b342e8fb..b69a3614 master -> origin/master
   7f47b99e..a9ce9d70 stable -> origin/stable
Updating b342e8fb..b69a3614
Fast-forward
 snap/plugins/x-nodejs.yaml | 8 --
 snap/plugins/x_nodejs.py | 332 ---------------------------------------------
 snap/snapcraft.yaml | 8 +-
 3 files changed, 6 insertions(+), 342 deletions(-)
 delete mode 100644 snap/plugins/x-nodejs.yaml
 delete mode 100644 snap/plugins/x_nodejs.py
nicole@MintyNicole ~/Development/hugo-git $ git pull
Already up to date.
nicole@MintyNicole ~/Development/hugo-git $ go clean -modcache && go install --tags extended
go: downloading github.com/alecthomas/chroma v0.7.2
go: downloading github.com/spf13/fsync v0.9.0
go: downloading github.com/spf13/pflag v1.0.5
go: downloading github.com/spf13/viper v1.6.1
go: downloading github.com/spf13/cast v1.3.1
go: downloading github.com/fsnotify/fsnotify v1.4.7
go: downloading github.com/disintegration/gift v1.2.1
go: downloading gopkg.in/yaml.v2 v2.2.7
go: downloading golang.org/x/image v0.0.0-20191214001246-9130b4cfad52
go: downloading github.com/gobwas/glob v0.2.3
go: downloading github.com/mitchellh/hashstructure v1.0.0
go: downloading github.com/spf13/cobra v0.0.5
go: downloading github.com/magiconair/properties v1.8.1
go: downloading github.com/bep/debounce v1.2.0
go: downloading github.com/PuerkitoBio/purell v1.1.1
go: downloading golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e
go: downloading gopkg.in/ini.v1 v1.51.1
go: downloading github.com/bep/gitmap v1.1.2
go: downloading golang.org/x/sys v0.0.0-20200107144601-ef85f5a75ddf
go: downloading github.com/hashicorp/hcl v1.0.0
go: downloading golang.org/x/text v0.3.2
go: downloading golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553
go: downloading github.com/pelletier/go-toml v1.6.0
go: downloading github.com/jdkato/prose v1.1.1
go: downloading google.golang.org/api v0.5.0
go: downloading github.com/BurntSushi/toml v0.3.1
go: downloading github.com/tdewolff/minify/v2 v2.6.2
go: downloading github.com/aws/aws-sdk-go v1.27.1
go: downloading github.com/olekukonko/tablewriter v0.0.4
go: downloading github.com/mattn/go-isatty v0.0.11
go: downloading github.com/niklasfasching/go-org v1.1.0
go: downloading github.com/dustin/go-humanize v1.0.0
go: downloading github.com/spf13/afero v1.2.2
go: downloading github.com/armon/go-radix v1.0.0
go: downloading github.com/mattn/go-runewidth v0.0.7
go: downloading github.com/yuin/goldmark-highlighting v0.0.0-20200307114337-60d527fdb691
go: downloading github.com/mitchellh/mapstructure v1.1.2
go: downloading github.com/cpuguy83/go-md2man v1.0.10
go: downloading github.com/yuin/goldmark v1.1.30
go: downloading github.com/tdewolff/parse/v2 v2.4.2
go: downloading github.com/pkg/errors v0.8.1
go: downloading gocloud.dev v0.15.0
go: downloading github.com/spf13/jwalterweatherman v1.1.0
go: downloading github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578
go: downloading github.com/danwakefield/fnmatch v0.0.0-20160403171240-cbb64ac3d964
go: downloading github.com/subosito/gotenv v1.2.0
go: downloading go.opencensus.io v0.22.0
go: downloading github.com/russross/blackfriday v1.5.3-0.20200218234912-41c5fccfd6f6
go: downloading github.com/muesli/smartcrop v0.3.0
go: downloading github.com/markbates/inflect v0.0.0-20171215194931-a12c3aec81a6
go: downloading github.com/bep/golibsass v0.6.0
go: downloading github.com/nicksnyder/go-i18n v1.10.0
go: downloading golang.org/x/oauth2 v0.0.0-20190523182746-aaccbc9213b0
go: downloading google.golang.org/grpc v1.21.0
go: downloading golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7
go: downloading github.com/gorilla/websocket v1.4.1
go: downloading github.com/google/wire v0.2.2
go: downloading github.com/miekg/mmark v1.3.6
go: downloading github.com/rogpeppe/go-internal v1.5.1
go: downloading github.com/rwcarlsen/goexif v0.0.0-20190401172101-9e8deecbddbd
go: downloading github.com/bep/tmc v0.5.1
go: downloading cloud.google.com/go v0.39.0
go: downloading github.com/googleapis/gax-go v2.0.2+incompatible
go: downloading github.com/BurntSushi/locker v0.0.0-20171006230638-a6e239ea1c69
go: downloading google.golang.org/genproto v0.0.0-20190522204451-c2c4e71fbf69
go: downloading github.com/golang/protobuf v1.3.1
go: downloading github.com/kyokomi/emoji v2.2.1+incompatible
go: downloading github.com/Azure/azure-pipeline-go v0.1.9
go: downloading github.com/dlclark/regexp2 v1.2.0
go: downloading github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af
go: downloading github.com/hashicorp/golang-lru v0.5.1
go: downloading github.com/google/uuid v1.1.1
go: downloading github.com/Azure/azure-storage-blob-go v0.6.0
go: downloading github.com/googleapis/gax-go/v2 v2.0.4
nicole@MintyNicole ~/Development/hugo-git $ go build -o hugo main.go
nicole@MintyNicole ~/Development/hugo-git $ cp hugo ~/bin/
nicole@MintyNicole ~/Development/hugo-git $ . ~/.bash_profile 
nicole@MintyNicole ~/Development/hugo-git $ hugo version
Hugo Static Site Generator v0.70.0 linux/amd64 BuildDate: unknown
nicole@MintyNicole ~/Development/hugo-git $

```

The issue is that I use the **–tags extended** build option but I do not get the extended build at the end.

The docs don’t explain what to do if you don’t get the extended version at all. It just assumes it worked.

I don’t know whether I’m just missing a dependency or whether there is something wrong in the build environment.  
I posted this on the bug tracker as well but I was redirected here and told to read the documentation which as I said, don’t help.

How can I make hugo build the correct (extended) version?

---

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [May 14, 2020, 12:49pm UTC](https://discourse.gohugo.io/t/cannot-create-extended-build-on-linux/25516/2 "2020-05-14T12:49:24Z")

</div>

Let’s see if it’s already installed in the GOPATH:

`"$GOPATH/bin/hugo" version`

> bash: /home/jmooring/go/bin/hugo: No such file or directory

OK, it’s not installed. Let’s build it.

```
mkdir $HOME/foo
cd $HOME/foo
git clone https://github.com/gohugoio/hugo.git
cd hugo
go install -tags extended

```

Let’s see if it’s installed now:

`"$GOPATH/bin/hugo" version`

> Hugo Static Site Generator v0.71.0-DEV/extended linux/amd64 BuildDate: unknown

---

<div class="post-metadata">

**Author:** ![Dutchess\_Nicole](https://avatars.discourse-cdn.com/v4/letter/d/8baadc/32.png) [@Dutchess\_Nicole](https://discourse.gohugo.io/u/Dutchess_Nicole)\
**Post date:** [May 14, 2020, 1:02pm UTC](https://discourse.gohugo.io/t/cannot-create-extended-build-on-linux/25516/3 "2020-05-14T13:02:43Z")

</div>

```auto
nicole@MintyNicole ~ $ echo $GOPATH

nicole@MintyNicole ~ $ cd Development/hugo-git/
nicole@MintyNicole ~/Development/hugo-git $ git branch
  master
* stable
nicole@MintyNicole ~/Development/hugo-git $ git pull
remote: Enumerating objects: 17, done.
remote: Counting objects: 100% (17/17), done.
remote: Compressing objects: 100% (7/7), done.
remote: Total 17 (delta 11), reused 14 (delta 10), pack-reused 0
Unpacking objects: 100% (17/17), done.
From https://github.com/gohugoio/hugo
   b69a3614..99193449 master -> origin/master
Already up to date.
nicole@MintyNicole ~/Development/hugo-git $ go install -tags extended
nicole@MintyNicole ~/Development/hugo-git $ echo $GOPATH

nicole@MintyNicole ~/Development/hugo-git $ which hugo
nicole@MintyNicole ~/Development/hugo-git $

```

Thank you but this answer doesn’t seem very relevant? For one, I don’t have a $GOPATH defined in my environment at all. I can make one, sure, but should I get that from somewhere?

Second: in your `go install` command you use the single dash (-tags), while the docs specify double dash (–tags) for the extended option. Which is it? Does it matter?

I also tried using the single dash option, the output looks exactly what I posted initially. No extended in the `hugo version` output.

---

<div class="post-metadata">

**Author:** ![jmooring](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/jmooring/32/4214_2.png) [@jmooring](https://discourse.gohugo.io/u/jmooring)\
**Post date:** [May 14, 2020, 1:30pm UTC](https://discourse.gohugo.io/t/cannot-create-extended-build-on-linux/25516/4 "2020-05-14T13:30:37Z")

</div>

[https://github.com/golang/go/wiki/GOPATH](https://github.com/golang/go/wiki/GOPATH)  
[https://github.com/golang/go/wiki/SettingGOPATH](https://github.com/golang/go/wiki/SettingGOPATH)

> If no `GOPATH` is set, it is assumed to be `$HOME/go` on Unix systems and `%USERPROFILE%\go` on Windows.

Do you have a “$HOME/go” directory?  
Do you have a “$HOME/go/bin” directory?  
Is there anything in it?

Regarding the `tags` option, run `go help build`

> -tags tag,list  
> a comma-separated list of build tags to consider satisfied during the  
> build. For more information about build tags, see the description of  
> build constraints in the documentation for the go/build package.  
> (Earlier versions of Go used a space-separated list, and that form  
> is deprecated but still recognized.)

A single hyphen, though on my system I get the same results with two hyphens.

---

<div class="post-metadata">

**Author:** ![Dutchess\_Nicole](https://avatars.discourse-cdn.com/v4/letter/d/8baadc/32.png) [@Dutchess\_Nicole](https://discourse.gohugo.io/u/Dutchess_Nicole)\
**Post date:** [May 14, 2020, 1:46pm UTC](https://discourse.gohugo.io/t/cannot-create-extended-build-on-linux/25516/5 "2020-05-14T13:46:27Z")

</div>

Thank you, that was the bit I was missing.  
I do have a ~/go/bin directory and the binary was installed there, however there is no answer to `which hugo` which of course means that it couldn’t be called.  
I have added `export PATH=$PATH:$HOME/go/bin` to my .bash\_profile and reloaded my environment. Now it does show up WITH the extended variable that I never got before.

Thank you so much for the help.

---

<div class="post-metadata">

**Author:** ![system](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/system/32/1_2.png) [@system](https://discourse.gohugo.io/u/system)\
**Post date:** [May 16, 2020, 1:46pm UTC](https://discourse.gohugo.io/t/cannot-create-extended-build-on-linux/25516/6 "2020-05-16T13:46:29Z")

</div>

Closed on May 16, 2020, 1:46pm UTC

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
