linux - Hugo 错误 - 当前主题不支持当前版本

标签 linux amazon-web-services ubuntu amazon-s3 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"

它说我需要 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.

所以我很困惑为什么会收到错误。有没有人遇到这个错误?知道我该如何解决吗?

最佳答案

Ubuntu 的主要下载库由 Canonical 维护,对于 GoHugo 的最新版本来说它们已经过时了。因此,sudo apt upgrade hugo 不会有太大帮助。即使是现在,hugo 的最新版本是 0.48,日期为 8 月,但 apt 只给我 0.40 截至 4 月的过期时间。

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 by whereis hugo and replacing it with newer versions.

关于linux - Hugo 错误 - 当前主题不支持当前版本,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46146268/

相关文章:

linux - 如何在 AP 模式下获取机器(Linux 上)的 IP 地址?

linux - 我们可以将实时服务器转换为 docker 镜像吗

php - E : Couldn't find any package by glob 'php-7.4'

r - 具有正确字符编码的 xml2::read_html 在 Ubuntu 上崩溃

c# - Sublime Build System 在工作目录中找不到代码

c - 获得 ALSA 支持的最大采样频率

c++ - AWS SNSClient 发布调用无法到达端点

amazon-web-services - 如何更改 aws EMR 上的 yarn 调度程序配置?

java - 找不到适用于 jdbc :amazonaws 的合适驱动程序

linux - 创建服务tomcat - 启动和关闭