[GH-ISSUE #1600] Why server shows that "package github.com/fatedier/frp: no Go files in /home/lgy/go/src/github.com/fatedier/frp" when I use GoLang to build frp??? #1267

Closed
opened 2026-05-05 12:48:30 -06:00 by gitea-mirror · 3 comments
Owner

Originally created by @LiuGaoyong on GitHub (Jan 7, 2020).
Original GitHub issue: https://github.com/fatedier/frp/issues/1600

Issue is only used for submiting bug report and documents typo. If there are same issues or answers can be found in documents, we will close it directly.
(为了节约时间,提高处理问题的效率,不按照格式填写的 issue 将会直接关闭。)
(请不要在 issue 评论中出现无意义的 加1我也是 等内容,将会被直接删除。)
(由于个人精力有限,和系统环境,网络环境等相关的求助问题请转至其他论坛或社交平台。)

Use the commands below to provide key information from your environment:
You do NOT have to include this information if this is a FEATURE REQUEST

What version of frp are you using (./frpc -v or ./frps -v)?
latest version 0.29

What operating system and processor architecture are you using (go env)?
centos 7

Configures you used:

Steps to reproduce the issue:
1.
2.
3.

Describe the results you received:

Describe the results you expected:

Additional information you deem important (e.g. issue happens only occasionally):

Can you point out what caused this issue (optional)

Originally created by @LiuGaoyong on GitHub (Jan 7, 2020). Original GitHub issue: https://github.com/fatedier/frp/issues/1600 Issue is only used for submiting bug report and documents typo. If there are same issues or answers can be found in documents, we will close it directly. (为了节约时间,提高处理问题的效率,不按照格式填写的 issue 将会直接关闭。) (请不要在 issue 评论中出现无意义的 **加1**,**我也是** 等内容,将会被直接删除。) (由于个人精力有限,和系统环境,网络环境等相关的求助问题请转至其他论坛或社交平台。) Use the commands below to provide key information from your environment: You do NOT have to include this information if this is a FEATURE REQUEST **What version of frp are you using (./frpc -v or ./frps -v)?** latest version 0.29 **What operating system and processor architecture are you using (`go env`)?** centos 7 **Configures you used:** **Steps to reproduce the issue:** 1. 2. 3. **Describe the results you received:** **Describe the results you expected:** **Additional information you deem important (e.g. issue happens only occasionally):** **Can you point out what caused this issue (optional)**
Author
Owner

@QQ2017 commented on GitHub (Jan 8, 2020):

#go get github.com/fatedier/frp
#cd /root/project/src/github.com/fatedier/frp
#make -f Makefile.cross-compiles

在go环境配置正确的情况下,以上命令可以编译成功,
go get github.com/fatedier/frp 会提示“package github.com/fatedier/frp: no Go files in /root/project/src/github.com/fatedier/frp” ,但是不影响编译,这是go在检查工程文件夹下是否存在*.go文件.

image

<!-- gh-comment-id:571859560 --> @QQ2017 commented on GitHub (Jan 8, 2020): #go get github.com/fatedier/frp #cd /root/project/src/github.com/fatedier/frp #make -f Makefile.cross-compiles 在go环境配置正确的情况下,以上命令可以编译成功, go get github.com/fatedier/frp 会提示“package github.com/fatedier/frp: no Go files in /root/project/src/github.com/fatedier/frp” ,但是不影响编译,这是go在检查工程文件夹下是否存在*.go文件. ![image](https://user-images.githubusercontent.com/23667705/71944719-adc4d180-31ff-11ea-9071-61482c66d42a.png)
Author
Owner

@zp0605 commented on GitHub (Nov 20, 2020):

root@ubuntu:# go get github.com/fatedier/frp
can't load package: package github.com/fatedier/frp: no Go files in /root/gocode/src/github.com/fatedier/frp
root@ubuntu:
#
root@ubuntu:# cd /root/gocode/src/github.com/fatedier/frp
root@ubuntu:
/gocode/src/github.com/fatedier/frp#
root@ubuntu:~/gocode/src/github.com/fatedier/frp# make -f Makefile.cross-compiles
env CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags "-s -w" -o ./release/frpc_darwin_amd64 ./cmd/frpc
pkg/plugin/client/socks5.go:25:2: cannot find package "github.com/armon/go-socks5" in any of:
/usr/local/go/src/github.com/armon/go-socks5 (from $GOROOT)
/root/gocode/src/github.com/armon/go-socks5 (from $GOPATH)
pkg/auth/oidc.go:23:2: cannot find package "github.com/coreos/go-oidc" in any of:
/usr/local/go/src/github.com/coreos/go-oidc (from $GOROOT)
/root/gocode/src/github.com/coreos/go-oidc (from $GOPATH)

为啥还是提示找不到包

<!-- gh-comment-id:730962054 --> @zp0605 commented on GitHub (Nov 20, 2020): root@ubuntu:~# go get github.com/fatedier/frp can't load package: package github.com/fatedier/frp: no Go files in /root/gocode/src/github.com/fatedier/frp root@ubuntu:~# root@ubuntu:~# cd /root/gocode/src/github.com/fatedier/frp root@ubuntu:~/gocode/src/github.com/fatedier/frp# root@ubuntu:~/gocode/src/github.com/fatedier/frp# make -f Makefile.cross-compiles env CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags "-s -w" -o ./release/frpc_darwin_amd64 ./cmd/frpc pkg/plugin/client/socks5.go:25:2: cannot find package "github.com/armon/go-socks5" in any of: /usr/local/go/src/github.com/armon/go-socks5 (from $GOROOT) /root/gocode/src/github.com/armon/go-socks5 (from $GOPATH) pkg/auth/oidc.go:23:2: cannot find package "github.com/coreos/go-oidc" in any of: /usr/local/go/src/github.com/coreos/go-oidc (from $GOROOT) /root/gocode/src/github.com/coreos/go-oidc (from $GOPATH) 为啥还是提示找不到包
Author
Owner

@QQ2017 commented on GitHub (Nov 20, 2020):

root@ubuntu:# go get github.com/fatedier/frp can't load package: package github.com/fatedier/frp: no Go files in /root/gocode/src/github.com/fatedier/frp root@ubuntu:#
root@ubuntu:# cd /root/gocode/src/github.com/fatedier/frp root@ubuntu:/gocode/src/github.com/fatedier/frp#
root@ubuntu:~/gocode/src/github.com/fatedier/frp# make -f Makefile.cross-compiles
env CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags "-s -w" -o ./release/frpc_darwin_amd64 ./cmd/frpc
pkg/plugin/client/socks5.go:25:2: cannot find package "github.com/armon/go-socks5" in any of:
/usr/local/go/src/github.com/armon/go-socks5 (from $GOROOT)
/root/gocode/src/github.com/armon/go-socks5 (from $GOPATH)
pkg/auth/oidc.go:23:2: cannot find package "github.com/coreos/go-oidc" in any of:
/usr/local/go/src/github.com/coreos/go-oidc (from $GOROOT)
/root/gocode/src/github.com/coreos/go-oidc (from $GOPATH)

为啥还是提示找不到包

go get -u github.com/fatedier/frp

然后看看github.com/armon/go-socks5文件夹有没有内容,如果没有的话,再 go get -u github.com/armon/go-socks5

<!-- gh-comment-id:730963208 --> @QQ2017 commented on GitHub (Nov 20, 2020): > root@ubuntu:~# go get github.com/fatedier/frp can't load package: package github.com/fatedier/frp: no Go files in /root/gocode/src/github.com/fatedier/frp root@ubuntu:~# > root@ubuntu:~# cd /root/gocode/src/github.com/fatedier/frp root@ubuntu:~/gocode/src/github.com/fatedier/frp# > root@ubuntu:~/gocode/src/github.com/fatedier/frp# make -f Makefile.cross-compiles > env CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags "-s -w" -o ./release/frpc_darwin_amd64 ./cmd/frpc > pkg/plugin/client/socks5.go:25:2: cannot find package "github.com/armon/go-socks5" in any of: > /usr/local/go/src/github.com/armon/go-socks5 (from $GOROOT) > /root/gocode/src/github.com/armon/go-socks5 (from $GOPATH) > pkg/auth/oidc.go:23:2: cannot find package "github.com/coreos/go-oidc" in any of: > /usr/local/go/src/github.com/coreos/go-oidc (from $GOROOT) > /root/gocode/src/github.com/coreos/go-oidc (from $GOPATH) > > 为啥还是提示找不到包 go get -u github.com/fatedier/frp 然后看看github.com/armon/go-socks5文件夹有没有内容,如果没有的话,再 go get -u github.com/armon/go-socks5
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#1267
No description provided.