Cannot find package "context". #641

Closed
opened 2025-11-02 03:31:14 -06:00 by GiteaMirror · 11 comments
Owner

Originally created by @Lourens-Rich on GitHub (Apr 13, 2017).

Hello. I tryed to build gitea, but it failed.

git@Ubuntu1604x64:~/go/src/code.gitea.io/gitea$ go build -v
vendor/code.gitea.io/git/command.go:9:2: cannot find package "context" in any of:
	/home/git/go/src/code.gitea.io/gitea/vendor/context (vendor tree)
	/usr/lib/go-1.6/src/context (from $GOROOT)
	/home/git/go/src/context (from $GOPATH)

I think it's associated with this commit: 135704d70e

Gitea version: d409d3a Go: go1.6.2 linux/amd64

Originally created by @Lourens-Rich on GitHub (Apr 13, 2017). Hello. I tryed to build gitea, but it failed. ``` git@Ubuntu1604x64:~/go/src/code.gitea.io/gitea$ go build -v vendor/code.gitea.io/git/command.go:9:2: cannot find package "context" in any of: /home/git/go/src/code.gitea.io/gitea/vendor/context (vendor tree) /usr/lib/go-1.6/src/context (from $GOROOT) /home/git/go/src/context (from $GOPATH) ``` I think it's associated with this commit: https://github.com/go-gitea/git/commit/135704d70ee8dddec363e80f3235092493fea2c2 Gitea version: d409d3a Go: go1.6.2 linux/amd64
GiteaMirror added the issue/regressionreviewed/wontfixtopic/build labels 2025-11-02 03:31:14 -06:00
Author
Owner

@sapk commented on GitHub (Apr 13, 2017):

I think that context lib was added in Go 1.7

@sapk commented on GitHub (Apr 13, 2017): I think that context lib was added in Go 1.7
Author
Owner

@sapk commented on GitHub (Apr 13, 2017):

It has moved to standards libs in Go1.7 to be exact. https://golang.org/doc/go1.7#context

Upgrade your go installation if possible.

@sapk commented on GitHub (Apr 13, 2017): It has moved to standards libs in Go1.7 to be exact. https://golang.org/doc/go1.7#context Upgrade your go installation if possible.
Author
Owner

@strk commented on GitHub (Apr 14, 2017):

This is a regression. Dropping support for Go 1.6 should be an explicit choice if any. Did anyone bisect to find the offending commit ?

@strk commented on GitHub (Apr 14, 2017): This is a regression. Dropping support for Go 1.6 should be an explicit choice if any. Did anyone bisect to find the offending commit ?
Author
Owner

@sapk commented on GitHub (Apr 14, 2017):

@strk The commit is in the issue description.

@sapk commented on GitHub (Apr 14, 2017): @strk The commit is in the issue description.
Author
Owner

@Lourens-Rich commented on GitHub (Apr 15, 2017):

I can close this issue if you promise to change build requirements for a next Gitea release.

@Lourens-Rich commented on GitHub (Apr 15, 2017): I can close this issue if you promise to change build requirements for a next Gitea release.
Author
Owner

@bkcsoft commented on GitHub (Apr 18, 2017):

Please keep it open until a fix has been merged :)

@bkcsoft commented on GitHub (Apr 18, 2017): Please keep it open until a fix has been merged :)
Author
Owner

@couling commented on GitHub (Jun 11, 2017):

FYI ubuntu 16.04 LTS still does not have support for go 1.7. Think carefully before dropping support for 1.6.

@couling commented on GitHub (Jun 11, 2017): FYI ubuntu 16.04 LTS still does not have support for go 1.7. Think carefully before dropping support for 1.6.
Author
Owner

@lunny commented on GitHub (Jun 12, 2017):

Maybe use golang.org/x/net/context until ubuntu supported go1.7?

@lunny commented on GitHub (Jun 12, 2017): Maybe use `golang.org/x/net/context` until ubuntu supported go1.7?
Author
Owner

@4oo4 commented on GitHub (Feb 10, 2018):

Any update on this? I was super excited to find out that Gitea existed and install it until I ran into this while building it.

I realized now I was just being super lazy, someone made a PPA for a newer go version. There are a few out there but this appears to be the most up to date:

https://launchpad.net/~gophers/+archive/ubuntu/archive

@4oo4 commented on GitHub (Feb 10, 2018): ~~Any update on this? I was super excited to find out that Gitea existed and install it until I ran into this while building it.~~ I realized now I was just being super lazy, someone made a PPA for a newer go version. There are a few out there but this appears to be the most up to date: https://launchpad.net/~gophers/+archive/ubuntu/archive
Author
Owner

@cez81 commented on GitHub (Feb 10, 2018):

@4oo4 What OS?

For Ubuntu 16.04 there is https://packages.ubuntu.com/xenial-backports/golang-1.9

Edit:: Could probably close this issue now as Go 1.8 is required.

@cez81 commented on GitHub (Feb 10, 2018): @4oo4 What OS? For Ubuntu 16.04 there is https://packages.ubuntu.com/xenial-backports/golang-1.9 Edit:: Could probably close this issue now as Go 1.8 is required.
Author
Owner

@4oo4 commented on GitHub (Feb 10, 2018):

@cez81 Yeah, Ubuntu 16.04. The package I found has a newer go 1.9 version than the backports one you linked to.

@4oo4 commented on GitHub (Feb 10, 2018): @cez81 Yeah, Ubuntu 16.04. The package I found has a newer go 1.9 version than the backports one you linked to.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#641