[GH-ISSUE #297] error on build go proxy #215

Closed
opened 2026-02-27 23:15:59 +03:00 by kerem · 2 comments
Owner

Originally created by @LETIAN-321 on GitHub (Jul 12, 2019).
Original GitHub issue: https://github.com/snail007/goproxy/issues/297

goproxy git:(master) CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o proxy
config.go:11:2: cannot find package "gopkg.in/alecthomas/kingpin.v2" in any of:
/usr/local/Cellar/go/1.12.6/libexec/src/gopkg.in/alecthomas/kingpin.v2 (from $GOROOT)
/Users/root/go/src/gopkg.in/alecthomas/kingpin.v2 (from $GOPATH)
config.go:8:2: cannot find package "proxy/services" in any of:
/usr/local/Cellar/go/1.12.6/libexec/src/proxy/services (from $GOROOT)
/Users/root/go/src/proxy/services (from $GOPATH)
config.go:9:2: cannot find package "proxy/utils" in any of:
/usr/local/Cellar/go/1.12.6/libexec/src/proxy/utils (from $GOROOT)
/Users/root/go/src/proxy/utils (from $GOPATH)

Originally created by @LETIAN-321 on GitHub (Jul 12, 2019). Original GitHub issue: https://github.com/snail007/goproxy/issues/297 goproxy git:(master) CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o proxy config.go:11:2: cannot find package "gopkg.in/alecthomas/kingpin.v2" in any of: /usr/local/Cellar/go/1.12.6/libexec/src/gopkg.in/alecthomas/kingpin.v2 (from $GOROOT) /Users/root/go/src/gopkg.in/alecthomas/kingpin.v2 (from $GOPATH) config.go:8:2: cannot find package "proxy/services" in any of: /usr/local/Cellar/go/1.12.6/libexec/src/proxy/services (from $GOROOT) /Users/root/go/src/proxy/services (from $GOPATH) config.go:9:2: cannot find package "proxy/utils" in any of: /usr/local/Cellar/go/1.12.6/libexec/src/proxy/utils (from $GOROOT) /Users/root/go/src/proxy/utils (from $GOPATH)
kerem closed this issue 2026-02-27 23:15:59 +03:00
Author
Owner

@snail007 commented on GitHub (Jul 12, 2019):

you should learn well basic knowledge of golang!

<!-- gh-comment-id:510731767 --> @snail007 commented on GitHub (Jul 12, 2019): you should learn well basic knowledge of golang!
Author
Owner

@damobrisbane commented on GitHub (Apr 13, 2020):

Perhaps, but I found same challenge too. Steps to test and build, in detail:

localhost:../src# git clone --depth=1 https://github.com/snail007/goproxy.git proxy

Cloning into 'proxy'...
remote: Enumerating objects: 251, done.
remote: Counting objects: 100% (251/251), done.
remote: Compressing objects: 100% (173/173), done.
remote: Total 251 (delta 80), reused 174 (delta 20), pack-reused 0
Receiving objects: 100% (251/251), 1.16 MiB | 913.00 KiB/s, done.
Resolving deltas: 100% (80/80), done.

localhost:../src# cd proxy/

localhost:../proxy# go test ./...

utils/io-limiter.go:8:2: cannot find package "golang.org/x/time/rate" in any of:
/usr/lib/golang/src/golang.org/x/time/rate (from $GOROOT)
/root/go/src/golang.org/x/time/rate (from $GOPATH)
config.go:11:2: cannot find package "gopkg.in/alecthomas/kingpin.v2" in any of:
/usr/lib/golang/src/gopkg.in/alecthomas/kingpin.v2 (from $GOROOT)
/root/go/src/gopkg.in/alecthomas/kingpin.v2 (from $GOPATH)

localhost:../proxy# go get -d ./...

localhost:../proxy# go test ./...
? proxy [no test files]
? proxy/services [no test files]
? proxy/utils [no test files]

localhost:../proxy# ls p*
ls: cannot access 'p*': No such file or directory

localhost:../proxy# go build .

localhost:../proxy# ls p*
proxy

<!-- gh-comment-id:613091804 --> @damobrisbane commented on GitHub (Apr 13, 2020): Perhaps, but I found same challenge too. Steps to test and build, in detail: localhost:../src# git clone --depth=1 https://github.com/snail007/goproxy.git **proxy** Cloning into 'proxy'... remote: Enumerating objects: 251, done. remote: Counting objects: 100% (251/251), done. remote: Compressing objects: 100% (173/173), done. remote: Total 251 (delta 80), reused 174 (delta 20), pack-reused 0 Receiving objects: 100% (251/251), 1.16 MiB | 913.00 KiB/s, done. Resolving deltas: 100% (80/80), done. localhost:../src# cd proxy/ localhost:../proxy# go test ./... utils/io-limiter.go:8:2: cannot find package "golang.org/x/time/rate" in any of: /usr/lib/golang/src/golang.org/x/time/rate (from $GOROOT) /root/go/src/golang.org/x/time/rate (from $GOPATH) config.go:11:2: cannot find package "gopkg.in/alecthomas/kingpin.v2" in any of: /usr/lib/golang/src/gopkg.in/alecthomas/kingpin.v2 (from $GOROOT) /root/go/src/gopkg.in/alecthomas/kingpin.v2 (from $GOPATH) localhost:../proxy# go get -d ./... localhost:../proxy# go test ./... ? proxy [no test files] ? proxy/services [no test files] ? proxy/utils [no test files] localhost:../proxy# ls p* ls: cannot access 'p*': No such file or directory localhost:../proxy# go build . localhost:../proxy# ls p* **proxy**
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/goproxy#215
No description provided.