1

I am trying to install git-lfs on an arm-based ubuntu machine. Package doesn't seem to exist so I need to install from source.

Seems like the installation depends on the go language so I installed it

sudo apt-get install golang-go

go version gives me: go1.2.1 linux/arm

Now I need to build git-lfs

go build ./src/github.com/git-lfs/git-lfs 

and I get:

cannot find package "context" in any of Same for net/http/httptrace

Other packages seem to have been found since I have set the path (after some fumbling around and setting a bunch of go environments params).

Now I see I can install more packages using go get , but it requires the full path, so I would need to know what is the fully qualified path to those two packages.

Is there a way to look up what is the full path for those packages? i.e. something equivalent to the py-pi in Python etc?

5
  • Go 1.2 is 5 years old... upgrade to 1.9 Commented Apr 1, 2018 at 13:45
  • 1.9 is outdated too. Update to 1.10.1. Find a tarball at golang.org/dl. Commented Apr 1, 2018 at 13:55
  • @Peter: Not true. Go supports the last two versions: "Each major Go release is supported until there are two newer major releases. Go 1.9 is supported until Go 1.11 is released." Go Release Policy Commented Apr 1, 2018 at 14:07
  • @peterSO, perhaps outdated was the wrong term. But advising to install a version that is not the most recent seems wrong to me. Commented Apr 1, 2018 at 14:16
  • @Peter: In production environments, it is common to run one or more versions behind, waiting for others to hopefully shake out any remaining bugs. In operating systems, Long Term Support (LTS) versions are commonly used for production: Ubuntu LTS. I use devel and test on the two most recently released versions. Commented Apr 1, 2018 at 14:42

1 Answer 1

0

Context was supported only in Go 1.7/1.8

You need to add the right archive, as explained in the Ubuntu page:

$ sudo add-apt-repository ppa:gophers/archive
$ sudo apt-get update
$ sudo apt-get install golang-1.10-go
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.