I do not want to turn on the server on linux elementary

I have a problem when I redirected the example site to the page I created and it doesn’t work anymore, it shows:
port 1313 already in use, attempting to use an available port
Building sites… ERROR 2021/11/07 16:35:15 render of “page” failed: execute of template failed: template: _default / search.html: 5: 8: executing “_default / search.html” at <partial " head.html “.>: error calling partial:” /home/sebastian/serafis/themes/PaperMod/layouts/partials/head.html:74:54 ": execute of template failed: template: partials / head.html: 74 : 54: executing “partials / head.html” at : can’t evaluate field Build in type string
Built in 107 ms
Error: Error building site: failed to render pages: render of “page” failed: execute of template failed: template: _default / search.html: 5: 8: executing “_default / search.html” at <partial "head.html “.>: error calling partial:” /home/sebastian/serafis/themes/PaperMod/layouts/partials/head.html:74:54 ": execute of template failed: template: partials / head.html: 74: 54: executing “partials / head.html” at : can’t evaluate field Build in type string

Please post the results of hugo env

You are running v0.68.3.
The js.Build capability was added in v0.74.0.
The current version is v0.89.1.

Please upgrade.

What command could I update hugo on linux with?

Please post the output of which hugo

Hey that depends on your Linux flavour.
E.g. on Debian which I use I run ‘apt update’ followed by ‘apt upgrade’, Ubuntu would be the same I think? There’s also other package managers than apt, so you’ll have to refer to your system documentation.

You can always deinstall the system go and download the fitting binary for your system from the front page. That would give you the latest version for sure, which isn’t guaranteed when you use the system packages.

I’m running Ubuntu 20.04.3 LTS. When I install using sudo apt install hugo, version 0.68.3 is installed. That’s the latest version available in the apt repositories for my version of Ubuntu, and there is not an official PPA.

So, uninstall with sudo apt purge hugo, then download a binary from:
https://github.com/gohugoio/hugo/releases/tag/v0.89.1

You want hugo_extended_0.89.1_Linux-64bit.tar.gz.
Extract the tarball, and place the executable somewhere in your $PATH.

Something like:

mkdir $HOME/hugotemp
cd $HOME/hugotemp
wget https://github.com/gohugoio/hugo/releases/download/v0.89.1/hugo_extended_0.89.1_Linux-64bit.tar.gz
tar -xvzf hugo_extended_0.89.1_Linux-64bit.tar.gz
sudo mv hugo /usr/local/bin
sudo chmod 755 /usr/local/bin/hugo
cd $HOME
rm -rf $HOME/hugotemp/

# Where is it installed? Should be /usr/local/bin/hugo
which hugo

# Verify version. Should be hugo v0.89.1-B6A4AE4A+extended linux/amd64 ...
hugo version

There’s a snap package as well, but it currently has some issues.

1 Like