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

问题描述 投票:4回答:2

我正在尝试构建我的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"

它说我需要雨果版本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.

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

linux amazon-web-services ubuntu amazon-s3 hugo
2个回答
1
投票

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


11
投票

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

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

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

或者手动,您可以下载最新版本link并更新您的版本,最后查看sudo hugo version。您还可以通过whereis hugo确认其在系统中的主要位置,并将其替换为更新的版本。

© www.soinside.com 2019 - 2024. All rights reserved.