Install

  • sudo apt-get remove golang --purge
  • curl -LO https://get.golang.org/$(uname)/go_installer && chmod +x go_installer && ./go_installer && rm go_installer
  • source $HOME/.bash_profile

compile something

  • go get github.com/ncw/rclone
  • $HOME/go/bin/rclone help

if you get process killed try

  • go get -d github.com/ncw/rclone
  • go build ./go/src/github.com/ncw/rclone
  • go install ./go/src/github.com/ncw/rclone
  • $HOME/go/bin/rclone

enable more swap if you have a 512MB VPS

  • sudo fallocate -l 1G /swapfile
  • sudo chmod 600 /swapfile
  • sudo mkswap /swapfile
  • sudo swapon /swapfile