Hugo version not updating to latest

寵の児 提交于 2021-02-20 02:51:31

问题


I am trying to work with the Hugo static site generator.

Problem: Hugo is saying it is updated to the latest version but it is not.

$ hugo version
Hugo Static Site Generator v0.40.1 linux/amd64 BuildDate: 2018-04-25T17:16:11Z

But the latest version is now v0.70.0

System: Windows Subsystem for Linux via the terminal in Visual Studio Code v1.45.0

Any help would be much appreciated thank you all.


回答1:


If you've installed it via the apt package manager, you might be out of luck there, because the official repositories might not be up to date with the latest version of Hugo.

To update the repositories and install the latest available version of hugo, try doing

sudo apt update
sudo apt install hugo

However, I see it's only getting version 0.6x.

If you want to use it on Windows, you could try installing it via Chocolatey or Scoop. Both seem to have version 0.70.x in their repositories, but you'd need to install them first, because they're not Windows out-of-the-box software. Not sure if and how it would work if you use it in the WSL, though.

Otherwise, there's always the good'ol download the binary and save it.




回答2:


If you're using a Debian-based system, e.g. Ubuntu, you can download the appropriate .deb from https://github.com/gohugoio/hugo/releases and install it with, for example:

sudo dpkg --install ./hugo_extended_0.70.0_Linux-64bit.deb

I wrote about this in footnote 10 in my Hugo Tutorial.




回答3:


The Ubuntu package manager "apt" does not contain the latest version of Hugo right now. It needs to be updated by the repo owner or similar.

I solved my problem by following a binary install guide here



来源:https://stackoverflow.com/questions/61677467/hugo-version-not-updating-to-latest

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!