Hugo

Error when installing Hugo with Homebrew

Using Linux CentOS 7:

[adrc_admin@vagrant ~]$ brew install hugo
==> Installing dependencies for hugo: go
==> Installing hugo dependency: go
==> Downloading https:///dl.google.com/go/go1.12.6.src.tar.gz
Already downloaded: /home/adrc_admin/.cache/Homebrew/downloads/7554f7e61790f208614f52a1b66b0da871ab8f5eaaad5eac14614e046f78cd47–go1.12.6.src.tar.gz
==> Downloading https:///github.com/golang/go/commit/26954bde4443c4bfbfe7608f35584b6b810f3f2c.patch?full_index=1
Already downloaded: /home/adrc_admin/.cache/Homebrew/downloads/89c5b3c478a796b5d9a82cb54e32c42b1f61066747eb0e4ab638fe7e3a23e2e8–26954bde4443c4bfbfe7608f35584b6b810f3f2c.patch
==> Downloading https:///github.com/golang/go/commit/0fe1986a72ea578390d4909988a1d7cb3a687544.patch?full_index=1
Already downloaded: /home/adrc_admin/.cache/Homebrew/downloads/e04c371ec61fb5b034e9c23e61240e4d1c8943d7c9bcb43781d1f31170893034–0fe1986a72ea578390d4909988a1d7cb3a687544.patch
==> Downloading https:///github.com/golang/go/commit/3f1422c799edb143303c86c0e875d44c3612df64.patch?full_index=1
Already downloaded: /home/adrc_admin/.cache/Homebrew/downloads/60eec0072a3c5e2b586ed0821d58f0fe2dd129ff199a0001178234a0346ee8a5–3f1422c799edb143303c86c0e875d44c3612df64.patch
==> Patching
==> Applying 26954bde4443c4bfbfe7608f35584b6b810f3f2c.patch
Error: Failure while executing; patch -g 0 -f -p1 -i /tmp/go--patch-20190710-32257-1sc2x01/26954bde4443c4bfbfe7608f35584b6b810f3f2c.patch exited with 1.

Brew on Linux? Isn’t that a Mac thingy? Ehem…

Anyway. This logs reads to me like this is not your first approach to install Hugo.

/home/adrc_admin/.cache/Homebrew/downloads << delete this folder (or it’s contents). You might need sudo to do this.

Then read the brew documentation on how to “clear out cache”. It probably has some kind of parameter for that. brew --help might help, but that is just a guess./

Then try again. If that does not work… it’s a Linux. What about snapd? If not, post the first error log after cleaning the cache. This to me looks like you have downloaded partial files to the cache and brew somehow doesn’t load new from “the internet”.

@NFinks The error message is not about hugo but about go, the language hugo is written in. Usually there is no need for linuxbrew to build go from source as it provides a bottled package where no building/patching is necessary. It seems like something’s wrong with your linuxbrew setup.

@pkollitsch Last time I checked linuxbrew is the only universal package manager that ships hugo with both man pages and bash completion support. So for some (like me) snapd is no alternative.

1 Like