canonical / lxd

Powerful system container and virtual machine manager
https://canonical.com/lxd
GNU Affero General Public License v3.0
4.35k stars 930 forks source link

Building from release does not work in Ubuntu 20.04 #8601

Closed creatica-soft closed 3 years ago

creatica-soft commented 3 years ago

Required information

Issue description

make fails with "go install: no install location for directory..."

Steps to reproduce

  1. Download lxd-4.12.tar.gz
  2. Unpack
  3. Follow building from release instrucitons in README.md. Everything works up to make. ... make go get -t -v -d ./... CC=cc go install -v -tags "libsqlite3" ./... go install: no install location for directory /root/lxd-4.12/fuidshift outside GOPATH For more details see: 'go help gopath' go install: no install location for directory /root/lxd-4.12/lxc outside GOPATH For more details see: 'go help gopath' go install: no install location for directory /root/lxd-4.12/lxc-to-lxd outside GOPATH For more details see: 'go help gopath' go install: no install location for directory /root/lxd-4.12/lxd outside GOPATH For more details see: 'go help gopath' go install: no install location for directory /root/lxd-4.12/lxd/db/generate outside GOPATH For more details see: 'go help gopath' go install: no install location for directory /root/lxd-4.12/lxd-agent outside GOPATH For more details see: 'go help gopath' go install: no install location for directory /root/lxd-4.12/lxd-benchmark outside GOPATH For more details see: 'go help gopath' go install: no install location for directory /root/lxd-4.12/lxd-p2c outside GOPATH For more details see: 'go help gopath' go install: no install location for directory /root/lxd-4.12/test/deps outside GOPATH For more details see: 'go help gopath' go install: no install location for directory /root/lxd-4.12/test/macaroon-identity outside GOPATH For more details see: 'go help gopath' make: *** [Makefile:20: default] Error 1
monstermunchkin commented 3 years ago

Try setting the environment variable to export GO111MODULE=off, then run make again. LXD doesn't support go modules which is why you are seeing this error.

stgraber commented 3 years ago

@monstermunchkin can you send a PR updating our Makefile and closing this issue?