我正在尝试构建我的hugo网站但是当我运行hugo检查时,我看到以下错误日志:
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.
所以我很困惑为什么我得到错误.有没有人遇到这个错误?知道我怎么解决它?
解决方法:
如果您没有使用apt获取最新版本的Hugo,那么您应该尝试直接从Github repository下载它.单击最新版本(或您需要的任何版本).进入发布页面后,向下滚动到“下载”部分,然后通过单击或使用wget下载压缩文件来下载文件.然后解压缩文件并运行./hugo版本以确认版本.