Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build hugo from source #129

Closed
aben20807 opened this issue Jun 20, 2022 · 1 comment
Closed

Build hugo from source #129

aben20807 opened this issue Jun 20, 2022 · 1 comment

Comments

@aben20807
Copy link
Owner

aben20807 commented Jun 20, 2022

  • Env: WSL2 Ubuntu 20.04
  • faced issues (cannot be installed from snap):
    • internal error, please report: running "hugo" failed: cannot find installed snap "hugo" at revision 12665: missing file /snap/hugo/12665/meta/snap.yaml --> give up snap
    • cannot perform operation: mount --rbind /dev /tmp/snap.rootfs_Aaaf74//dev: No such file or directory --> give up snap
    • build github.com/gohugoio/hugo: cannot load embed: malformed module path "embed": missing dot in first path element --> install latest go
  • trials:

Steps

  • install latest go
$ sudo add-apt-repository ppa:longsleep/golang-backports
$ sudo apt update
$ sudo apt install golang-go
$ go version
go version go1.18.3 linux/amd64
  • clone and build hugo
$ mkdir $HOME/go/src
$ cd $HOME/go/src
$ git clone https://github.com/gohugoio/hugo.git
$ cd hugo
$ go install --tags extended
$ hugo version
hugo v0.99.0-DEV-89c1655ec88cd7286c2ed5f9b7eaed35af9cda52+extended linux/amd64 BuildDate=2022-04-28T11:02:45Z
  • If hugo version is failed, remember to add go path to PATH
    • Add export PATH=$PATH:$HOME/go/bin in ~/.bashrc
@aben20807
Copy link
Owner Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant