[GH-ISSUE #143] osx 上 make失败 #90

Closed
opened 2026-05-05 11:44:22 -06:00 by gitea-mirror · 3 comments
Owner

Originally created by @Qquanwei on GitHub (Oct 21, 2016).
Original GitHub issue: https://github.com/fatedier/frp/issues/143

  • platform: osx
  • go version :1.6
  • $GOPATH : ~/go/
  • $GOROOT: ~/go/

在项目目录执行make报错

  go fmt ./src/...
go build -o bin/frps ./src/cmd/frps
src/cmd/frps/main.go:27:2: cannot find package "github.com/docopt/docopt-go" in any of:
    /usr/local/Cellar/go16/1.6.3/libexec/src/github.com/docopt/docopt-go (from $GOROOT)
    /Users/quanwei/go/src/github.com/docopt/docopt-go (from $GOPATH)
src/cmd/frps/main.go:29:2: cannot find package "github.com/fatedier/frp/src/assets" in any of:
    /usr/local/Cellar/go16/1.6.3/libexec/src/github.com/fatedier/frp/src/assets (from $GOROOT)
    /Users/quanwei/go/src/github.com/fatedier/frp/src/assets (from $GOPATH)
src/cmd/frps/control.go:23:2: cannot find package "github.com/fatedier/frp/src/models/consts" in any of:
    /usr/local/Cellar/go16/1.6.3/libexec/src/github.com/fatedier/frp/src/models/consts (from $GOROOT)
    /Users/quanwei/go/src/github.com/fatedier/frp/src/models/consts (from $GOPATH)
src/cmd/frps/control.go:24:2: cannot find package "github.com/fatedier/frp/src/models/metric" in any of:
    /usr/local/Cellar/go16/1.6.3/libexec/src/github.com/fatedier/frp/src/models/metric (from $GOROOT)
    /Users/quanwei/go/src/github.com/fatedier/frp/src/models/metric (from $GOPATH)
src/cmd/frps/control.go:25:2: cannot find package "github.com/fatedier/frp/src/models/msg" in any of:
    /usr/local/Cellar/go16/1.6.3/libexec/src/github.com/fatedier/frp/src/models/msg (from $GOROOT)
    /Users/quanwei/go/src/github.com/fatedier/frp/src/models/msg (from $GOPATH)
src/cmd/frps/control.go:26:2: cannot find package "github.com/fatedier/frp/src/models/server" in any of:
    /usr/local/Cellar/go16/1.6.3/libexec/src/github.com/fatedier/frp/src/models/server (from $GOROOT)
    /Users/quanwei/go/src/github.com/fatedier/frp/src/models/server (from $GOPATH)
src/cmd/frps/control.go:27:2: cannot find package "github.com/fatedier/frp/src/utils/conn" in any of:
    /usr/local/Cellar/go16/1.6.3/libexec/src/github.com/fatedier/frp/src/utils/conn (from $GOROOT)
    /Users/quanwei/go/src/github.com/fatedier/frp/src/utils/conn (from $GOPATH)
src/cmd/frps/control.go:28:2: cannot find package "github.com/fatedier/frp/src/utils/log" in any of:
    /usr/local/Cellar/go16/1.6.3/libexec/src/github.com/fatedier/frp/src/utils/log (from $GOROOT)
    /Users/quanwei/go/src/github.com/fatedier/frp/src/utils/log (from $GOPATH)
src/cmd/frps/control.go:29:2: cannot find package "github.com/fatedier/frp/src/utils/pcrypto" in any of:
    /usr/local/Cellar/go16/1.6.3/libexec/src/github.com/fatedier/frp/src/utils/pcrypto (from $GOROOT)
    /Users/quanwei/go/src/github.com/fatedier/frp/src/utils/pcrypto (from $GOPATH)
src/cmd/frps/main.go:33:2: cannot find package "github.com/fatedier/frp/src/utils/version" in any of:
    /usr/local/Cellar/go16/1.6.3/libexec/src/github.com/fatedier/frp/src/utils/version (from $GOROOT)
    /Users/quanwei/go/src/github.com/fatedier/frp/src/utils/version (from $GOPATH)
src/cmd/frps/main.go:34:2: cannot find package "github.com/fatedier/frp/src/utils/vhost" in any of:
    /usr/local/Cellar/go16/1.6.3/libexec/src/github.com/fatedier/frp/src/utils/vhost (from $GOROOT)
    /Users/quanwei/go/src/github.com/fatedier/frp/src/utils/vhost (from $GOPATH)
make: *** [frps] Error 1

不懂go,一开始以为是go版本问题装了个go1.6结果还是这种错误

Originally created by @Qquanwei on GitHub (Oct 21, 2016). Original GitHub issue: https://github.com/fatedier/frp/issues/143 - platform: osx - go version :1.6 - $GOPATH : ~/go/ - $GOROOT: ~/go/ 在项目目录执行make报错 ``` go fmt ./src/... go build -o bin/frps ./src/cmd/frps src/cmd/frps/main.go:27:2: cannot find package "github.com/docopt/docopt-go" in any of: /usr/local/Cellar/go16/1.6.3/libexec/src/github.com/docopt/docopt-go (from $GOROOT) /Users/quanwei/go/src/github.com/docopt/docopt-go (from $GOPATH) src/cmd/frps/main.go:29:2: cannot find package "github.com/fatedier/frp/src/assets" in any of: /usr/local/Cellar/go16/1.6.3/libexec/src/github.com/fatedier/frp/src/assets (from $GOROOT) /Users/quanwei/go/src/github.com/fatedier/frp/src/assets (from $GOPATH) src/cmd/frps/control.go:23:2: cannot find package "github.com/fatedier/frp/src/models/consts" in any of: /usr/local/Cellar/go16/1.6.3/libexec/src/github.com/fatedier/frp/src/models/consts (from $GOROOT) /Users/quanwei/go/src/github.com/fatedier/frp/src/models/consts (from $GOPATH) src/cmd/frps/control.go:24:2: cannot find package "github.com/fatedier/frp/src/models/metric" in any of: /usr/local/Cellar/go16/1.6.3/libexec/src/github.com/fatedier/frp/src/models/metric (from $GOROOT) /Users/quanwei/go/src/github.com/fatedier/frp/src/models/metric (from $GOPATH) src/cmd/frps/control.go:25:2: cannot find package "github.com/fatedier/frp/src/models/msg" in any of: /usr/local/Cellar/go16/1.6.3/libexec/src/github.com/fatedier/frp/src/models/msg (from $GOROOT) /Users/quanwei/go/src/github.com/fatedier/frp/src/models/msg (from $GOPATH) src/cmd/frps/control.go:26:2: cannot find package "github.com/fatedier/frp/src/models/server" in any of: /usr/local/Cellar/go16/1.6.3/libexec/src/github.com/fatedier/frp/src/models/server (from $GOROOT) /Users/quanwei/go/src/github.com/fatedier/frp/src/models/server (from $GOPATH) src/cmd/frps/control.go:27:2: cannot find package "github.com/fatedier/frp/src/utils/conn" in any of: /usr/local/Cellar/go16/1.6.3/libexec/src/github.com/fatedier/frp/src/utils/conn (from $GOROOT) /Users/quanwei/go/src/github.com/fatedier/frp/src/utils/conn (from $GOPATH) src/cmd/frps/control.go:28:2: cannot find package "github.com/fatedier/frp/src/utils/log" in any of: /usr/local/Cellar/go16/1.6.3/libexec/src/github.com/fatedier/frp/src/utils/log (from $GOROOT) /Users/quanwei/go/src/github.com/fatedier/frp/src/utils/log (from $GOPATH) src/cmd/frps/control.go:29:2: cannot find package "github.com/fatedier/frp/src/utils/pcrypto" in any of: /usr/local/Cellar/go16/1.6.3/libexec/src/github.com/fatedier/frp/src/utils/pcrypto (from $GOROOT) /Users/quanwei/go/src/github.com/fatedier/frp/src/utils/pcrypto (from $GOPATH) src/cmd/frps/main.go:33:2: cannot find package "github.com/fatedier/frp/src/utils/version" in any of: /usr/local/Cellar/go16/1.6.3/libexec/src/github.com/fatedier/frp/src/utils/version (from $GOROOT) /Users/quanwei/go/src/github.com/fatedier/frp/src/utils/version (from $GOPATH) src/cmd/frps/main.go:34:2: cannot find package "github.com/fatedier/frp/src/utils/vhost" in any of: /usr/local/Cellar/go16/1.6.3/libexec/src/github.com/fatedier/frp/src/utils/vhost (from $GOROOT) /Users/quanwei/go/src/github.com/fatedier/frp/src/utils/vhost (from $GOPATH) make: *** [frps] Error 1 ``` 不懂go,一开始以为是go版本问题装了个go1.6结果还是这种错误
Author
Owner

@Qquanwei commented on GitHub (Oct 21, 2016):

切到v0.7.0到正常编译,v0.8.0,v0.8.1 都失败

<!-- gh-comment-id:255315604 --> @Qquanwei commented on GitHub (Oct 21, 2016): 切到v0.7.0到正常编译,v0.8.0,v0.8.1 都失败
Author
Owner

@fatedier commented on GitHub (Oct 21, 2016):

Go 的项目放到 $GOPATH 下,建议你通过 go get github.com/fatedier/frp 下载源码。之后执行

cd $GOPATH/src/github.com/fatedier/frp && make

<!-- gh-comment-id:255317534 --> @fatedier commented on GitHub (Oct 21, 2016): Go 的项目放到 $GOPATH 下,建议你通过 go get github.com/fatedier/frp 下载源码。之后执行 `cd $GOPATH/src/github.com/fatedier/frp && make`。
Author
Owner

@Qquanwei commented on GitHub (Oct 21, 2016):

Thanks 可以了 :)

<!-- gh-comment-id:255319245 --> @Qquanwei commented on GitHub (Oct 21, 2016): Thanks 可以了 :)
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: github-starred/frp#90
No description provided.