Hello,
I’m trying to install Hugo from source on a Windows machine where I already have Git and Go installed, where I used the instructions from the docs:
mkdir $HOME/src
cd $HOME/src
git clone https://github.com/gohugoio/hugo.git
cd hugo
go install --tags extended
However, I get the following error:
C:\tools\Hugo\src (master -> origin)
λ go install --tags extended
# github.com/wellington/go-libsass/libs
exec: "gcc": executable file not found in %PATH%
What should I do as a workaround?
Thank you for the support,
Carlos Soares.
From issues: https://github.com/gohugoio/hugo/issues/5798
Update 1
I have now installed gcc and g++ using cygwin but still some issue persists:
λ go install --tags extended
# github.com/gohugoio/hugo
C:\tools\Go\pkg\tool\windows_amd64\link.exe: running g++ failed: exit status 1
/usr/lib/gcc/x86_64-pc-cygwin/7.4.0/../../../../x86_64-pc-cygwin/bin/ld: cannot find -lmingwex
/usr/lib/gcc/x86_64-pc-cygwin/7.4.0/../../../../x86_64-pc-cygwin/bin/ld: cannot find -lmingw32
collect2: error: ld returned 1 exit status
Can someone help?
The main issue that I’m trying to solve is to have the Hugo extended edition on Windows. So I’m trying to compile it myself.
Update 2
I tried to reinstall Cygwin with the Dev modules but now I get the following error:
λ go install --tags extended
# github.com/gohugoio/hugo
C:\tools\Go\pkg\tool\windows_amd64\link.exe: running g++ failed: exec: "g++": executable file not found in %PATH%