I'm attempting to build my hugo site but when I run hugo check
I see the following error log:
ERROR: 2017/09/10 Current theme does not support Hugo version 0.14. Minimum version required is 0.18
ERROR: 2017/09/10 template: theme/_default/baseof.html:2: function "default" not defined
ERROR: 2017/09/10 template: redefinition of template "main"
ERROR: 2017/09/10 template: theme/_default/single.html:7: function "humanize" not defined
ERROR: 2017/09/10 template: redefinition of template "main"
ERROR: 2017/09/10 template: theme/_default/terms.html:12: function "relLangURL" not defined
ERROR: 2017/09/10 template: theme/index.html:6: function "default" not defined
ERROR: 2017/09/10 template: theme/partials/menu-contextual.html:12: function "humanize" not defined
ERROR: 2017/09/10 template: theme/partials/page-header.html:9: function "default" not defined
ERROR: 2017/09/10 template: theme/partials/site-footer.html:4: function "now" not defined
ERROR: 2017/09/10 template: theme/partials/site-header.html:1: function "default" not defined
ERROR: 2017/09/10 template: theme/partials/social-follow.html:5: function "dict" not defined
ERROR: 2017/09/10 template: theme/partials/summary.html:3: function "humanize" not defined
ERROR: 2017/09/10 template: theme/post/single.html:11: function "humanize" not defined
ERROR: 2017/09/10 template: redefinition of template "main"
It says that I need Hugo version 0.18 but when I run sudo apt-get install hugo
it tells me:
hugo is already the newest version
0 upgraded, 0 newly installed, 0 to remove and 15 not upgraded.
So I'm confused as to why I'm getting the error. Has anyone run into this error? Know how I can fix it?
Ubuntu's main download repos are maintained by Canonical, and they are outdated for GoHugo latest releases. Hence, sudo apt upgrade hugo
will not be much of help. Even now, hugo latest release is 0.48 dated August but the apt gives me only upto 0.40 outdated as of April.
Always try to use
sudo snap install hugo
in Ubuntu for up-to-date experience with Go Hugo. Snaps are maintained and updated very well. So even if you miss manually to update your packages, it seamlessly updates in background within 12 hours of releases after arriving at Snap Stores.Uninstall all the instances of Hugo and try fresh installation with snaps if possible because new versions always tend to leave support for some old configs. You can try verifying your needed hugo version using
sudo snap search hugo
which gives details of which latest version is available in snap store currently.Or manually you could download the latest release link and update your version and finally check with
sudo hugo version
. You can also confirm its primary location in system bywhereis hugo
and replacing it with newer versions.
If you're not getting the latest version of Hugo using apt
then you should attempt to download it directly from the Github repository. Click on the latest release (or whichever version you need). Once you're on the release page, scroll down to the Downloads section and then download the file by clicking on it or by using wget
download the compressed file. Then extract the file and run ./hugo version
to confirm the version.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With