[GH-ISSUE #16] Build failes with "use of internal package not allowed" #8

Closed
opened 2026-02-26 12:33:42 +03:00 by kerem · 6 comments
Owner

Originally created by @Alireza2n on GitHub (Feb 24, 2019).
Original GitHub issue: https://github.com/cbeuw/Cloak/issues/16

Hi,
I am trying to build Cloak using latest source available, but no matter what I do build fails with either of these two messages:
use of internal package not allowed
or
cannot find package "github.com/cbeuw/Cloak/internal/ecdh" in any of ...

Any suggestions?

Originally created by @Alireza2n on GitHub (Feb 24, 2019). Original GitHub issue: https://github.com/cbeuw/Cloak/issues/16 Hi, I am trying to build Cloak using latest source available, but no matter what I do build fails with either of these two messages: `use of internal package not allowed` or `cannot find package "github.com/cbeuw/Cloak/internal/ecdh" in any of ...` Any suggestions?
kerem closed this issue 2026-02-26 12:33:42 +03:00
Author
Owner

@cbeuw commented on GitHub (Feb 25, 2019):

  1. Make sure you have set $GOPATH https://golang.org/doc/install#tarball

  2. Did you use go get or git clone when you fetched this repo? If it's the latter please use go get instead

<!-- gh-comment-id:466943343 --> @cbeuw commented on GitHub (Feb 25, 2019): 1. Make sure you have set $GOPATH https://golang.org/doc/install#tarball 2. Did you use go get or git clone when you fetched this repo? If it's the latter please use go get instead
Author
Owner

@Alireza2n commented on GitHub (Feb 27, 2019):

Hi,
Thanks for quick update.

1- GOPATH is already set.
2- Using go get:
go get github.com/cbeuw/Cloak
And output is:
package github.com/cbeuw/Cloak: no Go files in /root/go/src/github.com/cbeuw/Cloak

<!-- gh-comment-id:467753167 --> @Alireza2n commented on GitHub (Feb 27, 2019): Hi, Thanks for quick update. 1- GOPATH is already set. 2- Using go get: `go get github.com/cbeuw/Cloak` And output is: `package github.com/cbeuw/Cloak: no Go files in /root/go/src/github.com/cbeuw/Cloak`
Author
Owner

@cbeuw commented on GitHub (Mar 1, 2019):

Did you build with Makefile?

When do you get the first error message and when do you get the second one?

cd into $GOPATH/src/github.com/cbeuw/Cloak/internal/ecdh, is there anything in this folder?

<!-- gh-comment-id:468639362 --> @cbeuw commented on GitHub (Mar 1, 2019): Did you build with Makefile? When do you get the first error message and when do you get the second one? cd into $GOPATH/src/github.com/cbeuw/Cloak/internal/ecdh, is there anything in this folder?
Author
Owner

@Alireza2n commented on GitHub (Mar 16, 2019):

Did you build with Makefile?

Yes, I have used make file.

When do you get the first error message and when do you get the second one?

I have simply used make server and when failed I tried go get github.com/cbeuw/Cloak.

cd into $GOPATH/src/github.com/cbeuw/Cloak/internal/ecdh, is there anything in this folder?

Yep:
ls $GOPATH/src/github.com/cbeuw/Cloak/internal/ecdh
curve25519.go

Here is what I've done:
1- cd $GOPATH/src/github.com/cbeuw
2- git clone https://github.com/cbeuw/Cloak.git
3- make server
And output was:

mkdir -p build
go build -ldflags "-X main.version=master(cffee14)" ./cmd/ck-server
/usr/lib/go-1.10/src/github.com/cbeuw/Cloak/internal/server/usermanager/userpanel.go:13:2: cannot find package "github.com/boltdb/bolt" in any of:
	/usr/lib/go-1.10/src/vendor/github.com/boltdb/bolt (vendor tree)
	/usr/lib/go/src/vendor/github.com/boltdb/bolt
	/usr/lib/go-1.10/src/github.com/boltdb/bolt (from $GOROOT)
	/usr/lib/go/src/github.com/boltdb/bolt (from $GOPATH)
/usr/lib/go-1.10/src/github.com/cbeuw/Cloak/internal/multiplex/qos.go:6:2: cannot find package "github.com/juju/ratelimit" in any of:
	/usr/lib/go-1.10/src/vendor/github.com/juju/ratelimit (vendor tree)
	/usr/lib/go/src/vendor/github.com/juju/ratelimit
	/usr/lib/go-1.10/src/github.com/juju/ratelimit (from $GOROOT)
	/usr/lib/go/src/github.com/juju/ratelimit (from $GOPATH)
/usr/lib/go-1.10/src/github.com/cbeuw/Cloak/internal/ecdh/curve25519.go:35:2: cannot find package "golang.org/x/crypto/curve25519" in any of:
	/usr/lib/go-1.10/src/vendor/golang.org/x/crypto/curve25519 (vendor tree)
	/usr/lib/go/src/vendor/golang.org/x/crypto/curve25519
	/usr/lib/go-1.10/src/golang.org/x/crypto/curve25519 (from $GOROOT)
	/usr/lib/go/src/golang.org/x/crypto/curve25519 (from $GOPATH)
make: *** [Makefile:16: server] Error 1

<!-- gh-comment-id:473506358 --> @Alireza2n commented on GitHub (Mar 16, 2019): > Did you build with Makefile? Yes, I have used make file. > When do you get the first error message and when do you get the second one? I have simply used `make server` and when failed I tried ` go get github.com/cbeuw/Cloak `. > cd into $GOPATH/src/github.com/cbeuw/Cloak/internal/ecdh, is there anything in this folder? Yep: `ls $GOPATH/src/github.com/cbeuw/Cloak/internal/ecdh` `curve25519.go` Here is what I've done: 1- `cd $GOPATH/src/github.com/cbeuw` 2- `git clone https://github.com/cbeuw/Cloak.git` 3- `make server` And output was: ``` mkdir -p build go build -ldflags "-X main.version=master(cffee14)" ./cmd/ck-server /usr/lib/go-1.10/src/github.com/cbeuw/Cloak/internal/server/usermanager/userpanel.go:13:2: cannot find package "github.com/boltdb/bolt" in any of: /usr/lib/go-1.10/src/vendor/github.com/boltdb/bolt (vendor tree) /usr/lib/go/src/vendor/github.com/boltdb/bolt /usr/lib/go-1.10/src/github.com/boltdb/bolt (from $GOROOT) /usr/lib/go/src/github.com/boltdb/bolt (from $GOPATH) /usr/lib/go-1.10/src/github.com/cbeuw/Cloak/internal/multiplex/qos.go:6:2: cannot find package "github.com/juju/ratelimit" in any of: /usr/lib/go-1.10/src/vendor/github.com/juju/ratelimit (vendor tree) /usr/lib/go/src/vendor/github.com/juju/ratelimit /usr/lib/go-1.10/src/github.com/juju/ratelimit (from $GOROOT) /usr/lib/go/src/github.com/juju/ratelimit (from $GOPATH) /usr/lib/go-1.10/src/github.com/cbeuw/Cloak/internal/ecdh/curve25519.go:35:2: cannot find package "golang.org/x/crypto/curve25519" in any of: /usr/lib/go-1.10/src/vendor/golang.org/x/crypto/curve25519 (vendor tree) /usr/lib/go/src/vendor/golang.org/x/crypto/curve25519 /usr/lib/go-1.10/src/golang.org/x/crypto/curve25519 (from $GOROOT) /usr/lib/go/src/golang.org/x/crypto/curve25519 (from $GOPATH) make: *** [Makefile:16: server] Error 1 ```
Author
Owner

@cbeuw commented on GitHub (Mar 16, 2019):

Ah I see, it's simply due to the dependencies not present. You need to do go get github.com/boltdb/bolt, go get github.com/juju/ratelimit and go get golang.org/x/crypto/curve25519 to fetch them.

<!-- gh-comment-id:473507167 --> @cbeuw commented on GitHub (Mar 16, 2019): Ah I see, it's simply due to the dependencies not present. You need to do `go get github.com/boltdb/bolt`, `go get github.com/juju/ratelimit` and `go get golang.org/x/crypto/curve25519` to fetch them.
Author
Owner

@cbeuw commented on GitHub (Mar 16, 2019):

I have updated README to make clear the need of dependencies

<!-- gh-comment-id:473507315 --> @cbeuw commented on GitHub (Mar 16, 2019): I have updated README to make clear the need of dependencies
Sign in to join this conversation.
No labels
pull-request
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/Cloak#8
No description provided.