【发布时间】:2018-02-19 03:19:35
【问题描述】:
我正在尝试构建我的 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"
它说我需要 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.
所以我很困惑为什么我会收到错误。有没有人遇到这个错误?知道我该如何解决吗?
【问题讨论】:
-
请在您的问题中包含运行
hugo env的输出。此外,这似乎与您添加到问题中的任何标签都无关,除了hugo。当然不是 AWS 或 S3 标签。 -
我忘了提到我在 EC2 实例上运行它并将网站部署在 S3 上。这就是为什么这些标签在那里。此外,
hugo env似乎不是支持命令。 -
这似乎仍然与您遇到的实际问题无关。您似乎正在运行旧版本的 Hugo 0.14,
upgrade命令似乎不起作用。建议去这里下载最新版本手动安装github.com/gohugoio/hugo/releases -
upgrade命令只是sudo apt-get upgrade hugo吗?你也是说我应该去存储库克隆它吗?如何使用它来升级我安装的 Hugo 版本? -
我提供的链接是发布页面,其中包含可以下载的二进制文件。尽管您可以先尝试
sudo apt-get upgrade hugo看看是否可行,但这将是更好的选择。你最初是如何安装 Hugo 的?如果您使用apt,则使用它进行升级。
标签: linux amazon-web-services ubuntu amazon-s3 hugo