Skip to content
This repository has been archived by the owner on Sep 9, 2020. It is now read-only.

gps/constraint.go:149:4: undefined: semver.Constraint #2223

Closed
ghost opened this issue Dec 11, 2019 · 5 comments
Closed

gps/constraint.go:149:4: undefined: semver.Constraint #2223

ghost opened this issue Dec 11, 2019 · 5 comments

Comments

@ghost
Copy link

ghost commented Dec 11, 2019

Hi,

Hope you are all well !

While trying to "go get -u github.com/golang/dep/cmd/dep" in an alpine based docker container, I have the following error (last line):

+ go get -u github.com/golang/dep/cmd/dep
go: finding github.com/golang/dep v0.5.4
go: downloading github.com/golang/dep v0.5.4
go: extracting github.com/golang/dep v0.5.4
go: downloading golang.org/x/sync v0.0.0-20190423024810-112230192c58
go: extracting golang.org/x/sync v0.0.0-20190423024810-112230192c58
go: downloading github.com/pkg/errors v0.8.0
go: downloading github.com/pelletier/go-toml v1.2.0
go: extracting github.com/pkg/errors v0.8.0
go: extracting github.com/pelletier/go-toml v1.2.0
go: finding github.com/Masterminds/semver v1.5.0
go: downloading github.com/Masterminds/semver v1.5.0
go: downloading github.com/golang/protobuf v1.2.0
go: downloading golang.org/x/sys v0.0.0-20190422165155-953cdadca894
go: finding github.com/jmank88/nuts v0.4.0
go: extracting github.com/Masterminds/semver v1.5.0
go: downloading github.com/jmank88/nuts v0.4.0
go: extracting github.com/golang/protobuf v1.2.0
go: finding github.com/Masterminds/vcs v1.13.1
go: finding github.com/armon/go-radix v1.0.0
go: finding github.com/sdboyer/constext latest
go: finding github.com/nightlyone/lockfile latest
go: downloading github.com/armon/go-radix v1.0.0
go: downloading github.com/Masterminds/vcs v1.13.1
go: downloading github.com/sdboyer/constext v0.0.0-20170321163424-836a14457353
go: downloading github.com/nightlyone/lockfile v0.0.0-20180618180623-0ad87eef1443
go: extracting github.com/jmank88/nuts v0.4.0
go: extracting github.com/nightlyone/lockfile v0.0.0-20180618180623-0ad87eef1443
go: extracting github.com/Masterminds/vcs v1.13.1
go: extracting github.com/armon/go-radix v1.0.0
go: extracting github.com/sdboyer/constext v0.0.0-20170321163424-836a14457353
go: downloading github.com/boltdb/bolt v1.3.1
go: extracting golang.org/x/sys v0.0.0-20190422165155-953cdadca894
go: downloading gopkg.in/yaml.v2 v2.2.1
go: extracting github.com/boltdb/bolt v1.3.1
go: extracting gopkg.in/yaml.v2 v2.2.1
go: downloading golang.org/x/sys v0.0.0-20191026070338-33540a1f6037
go: extracting golang.org/x/sys v0.0.0-20191026070338-33540a1f6037
go: finding github.com/boltdb/bolt v1.3.1
go: finding github.com/pkg/errors v0.8.1
go: finding gopkg.in/yaml.v2 v2.2.7
go: finding github.com/golang/protobuf v1.3.2
go: finding golang.org/x/sys latest
go: finding golang.org/x/sync latest
go: finding github.com/pelletier/go-toml v1.6.0
go: downloading golang.org/x/sys v0.0.0-20191210023423-ac6580df4449
go: downloading github.com/pkg/errors v0.8.1
go: downloading github.com/golang/protobuf v1.3.2
go: downloading golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e
go: downloading github.com/pelletier/go-toml v1.6.0
go: downloading gopkg.in/yaml.v2 v2.2.7
go: extracting github.com/pkg/errors v0.8.1
go: extracting golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e
go: extracting github.com/pelletier/go-toml v1.6.0
go: extracting gopkg.in/yaml.v2 v2.2.7
go: extracting github.com/golang/protobuf v1.3.2
go: extracting golang.org/x/sys v0.0.0-20191210023423-ac6580df4449
# github.com/golang/dep/gps
/go/pkg/mod/github.com/golang/dep@v0.5.4/gps/constraint.go:149:4: undefined: semver.Constraint

Is there any issue with the package ?

Cheers,
X.

@hxnan
Copy link

hxnan commented Jan 8, 2020

Somthing may help: #2055

@TzeHimSung
Copy link

Here meet the same problem.

$ go get -u github.com/golang/dep/cmd/dep
go: finding golang.org/x/sync latest
go: finding github.com/sdboyer/constext latest
go: finding github.com/nightlyone/lockfile latest
go: finding golang.org/x/sys latest
# github.com/golang/dep/gps
../../pkg/mod/github.com/golang/dep@v0.5.4/gps/constraint.go:149:4: undefined: semver.Constraint

@TzeHimSung
Copy link

Here meet the same problem.

$ go get -u github.com/golang/dep/cmd/dep
go: finding golang.org/x/sync latest
go: finding github.com/sdboyer/constext latest
go: finding github.com/nightlyone/lockfile latest
go: finding golang.org/x/sys latest
# github.com/golang/dep/gps
../../pkg/mod/github.com/golang/dep@v0.5.4/gps/constraint.go:149:4: undefined: semver.Constraint

solve this problem with using proxychains

proxychains curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh

@michael-myers
Copy link

I too was having the problem, so I did:
$ go env -w GO111MODULE=off
to turn off Go Modules, before installing dep:
$ go get -u github.com/golang/dep

@mvdan
Copy link
Member

mvdan commented Sep 4, 2020

Dep was officially deprecated earlier this year, and the proposal to archive this repository was accepted. As such, I'm closing outstanding issues before archiving the repository. For any further comments, please use the proposal thread on the Go issue tracker. Thanks!

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

No branches or pull requests

4 participants