基础知识: go 基本环境配置  GCC  GCC-C++ g++等相关需要提前安装好

 

[root@iZ3n2gw1h0luhgZ myblog]# hugo server -D
Start building sites … 
hugo v0.87.0 linux/amd64 BuildDate=unknown
Error: Error building site: TOCSS: failed to transform "ananke/css/main.css" (text/css). Check your Hugo installation; you need the extended version to build SCSS/SASS.
Built in 28 ms

 

解决该报错,官方回复:

经常被问及的问题|雨 果 (gohugo.io)

以及stack overflow

sass - How to setup SCSS with Hugo - Stack Overflow

也就是使用 extended版本即可。在真实情况下,我却遇到如下情况:

hugo -- Error building site: TOCSS: failed to tran_hugo TOCSS

说明hugo-extended并未考虑到库依赖,故需要源码编译加上参数:

CGO_ENABLED=1 go install --tags extended
如下是操作方式
git clone https://github.com/gohugoio/hugo.git
cd hugo
go install
该版本是0.88版本DEV,成功运行
hugo -- Error building site: TOCSS: failed to tran_hugo TOCSS_02