Hugo Error - 当前主题不支持当前版本

sgm*_*gmm 4 linux ubuntu amazon-s3 amazon-web-services hugo

我正在尝试构建我的hugo网站,但是当我运行时,hugo check我看到以下错误日志:

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"
Run Code Online (Sandbox Code Playgroud)

它说我需要Hugo版本0.18,但是当我运行sudo apt-get install hugo它时告诉我:

hugo is already the newest version
0 upgraded, 0 newly installed, 0 to remove and 15 not upgraded.
Run Code Online (Sandbox Code Playgroud)

所以我很困惑为什么我得到错误.有没有人遇到这个错误?知道我怎么解决它?

Spa*_*rsh 12

Ubuntu的主要下载存储库由Canonical维护,它们已经过时了GoHugo的最新版本.因此,sudo apt upgrade hugo没有多大帮助.即使是现在,hugo最新发布的版本是8月份的0.48,但截至4月份,这个版本只给我0.40.

总是尝试sudo snap install hugo在Ubuntu中使用Go Hugo的最新体验.快照得到维护和更新.因此,即使您手动错过更新软件包,它也会在到达Snap Stores后的12小时内无缝更新.

如果可能的话,卸载Hugo的所有实例并尝试使用快照进行全新安装,因为新版本总是倾向于支持一些旧配置.您可以尝试验证所需的hugo版本,使用sudo snap search hugo该版本提供当前快照商店中可用的最新版本的详细信息.

或者手动,您可以下载最新版本链接并更新您的版本,最后检查sudo hugo version.您还可以在系统中确认其主要位置,whereis hugo并将其替换为较新版本.


小智 3

如果您没有使用最新版本的 Hugo,那么您应该尝试直接从Github 存储库apt下载它。单击最新版本(或您需要的任何版本)。进入发布页面后,向下滚动到“下载”部分,然后通过单击该文件或使用“下载压缩文件”来下载该文件。然后提取文件并运行以确认版本。wget./hugo version