[GH-ISSUE #946] 编译源码出错,希望获得帮助,谢谢 #752

Closed
opened 2026-05-05 12:28:57 -06:00 by gitea-mirror · 1 comment
Owner

Originally created by @ghost on GitHub (Oct 19, 2018).
Original GitHub issue: https://github.com/fatedier/frp/issues/946

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 将会直接关闭。)

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)?
0.8-0.16尝试过

What operating system and processor architecture are you using (go env)?
linux amd64 ubuntu

Configures you used:
[common]
server_addr =*************
server_port = 7000
privilege_token = 123456
admin_addr=127.0.0.1
admin_port=7400
log_level = error
log_max_days = 3
[SSH]
type = tcp
local_ip = 127.0.0.1
local_port = 22
remote_port=6001

Steps to reproduce the issue:
1.尝试编译frp,在Ubuntu14.04 64位,安装go版本1.91,编译0.1-0.7都可以通过
2.但是编译0.8以上版本报错
3.

Describe the results you received:
/////////////////////////编译0.8版本报错如下:make
go fmt ./src/...
go build -o bin/frps ./src/cmd/frps
src/cmd/frps/main.go:29:2: cannot find package "github.com/fatedier/frp/src/assets" in any of:
/usr/local/go/src/github.com/fatedier/frp/src/assets (from $GOROOT)
/home//gocode/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/go/src/github.com/fatedier/frp/src/models/consts (from $GOROOT)
/home/
/gocode/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/msg" in any of:
/usr/local/go/src/github.com/fatedier/frp/src/models/msg (from $GOROOT)
/home//gocode/src/github.com/fatedier/frp/src/models/msg (from $GOPATH)
src/cmd/frps/control.go:25:2: cannot find package "github.com/fatedier/frp/src/models/server" in any of:
/usr/local/go/src/github.com/fatedier/frp/src/models/server (from $GOROOT)
/home/
/gocode/src/github.com/fatedier/frp/src/models/server (from $GOPATH)
src/cmd/frps/control.go:26:2: cannot find package "github.com/fatedier/frp/src/utils/conn" in any of:
/usr/local/go/src/github.com/fatedier/frp/src/utils/conn (from $GOROOT)
/home//gocode/src/github.com/fatedier/frp/src/utils/conn (from $GOPATH)
src/cmd/frps/control.go:27:2: cannot find package "github.com/fatedier/frp/src/utils/log" in any of:
/usr/local/go/src/github.com/fatedier/frp/src/utils/log (from $GOROOT)
/home/
/gocode/src/github.com/fatedier/frp/src/utils/log (from $GOPATH)
src/cmd/frps/control.go:28:2: cannot find package "github.com/fatedier/frp/src/utils/pcrypto" in any of:
/usr/local/go/src/github.com/fatedier/frp/src/utils/pcrypto (from $GOROOT)
/home//gocode/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/go/src/github.com/fatedier/frp/src/utils/version (from $GOROOT)
/home/
/gocode/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/go/src/github.com/fatedier/frp/src/utils/vhost (from $GOROOT)
/home/**/gocode/src/github.com/fatedier/frp/src/utils/vhost (from $GOPATH)
/////////////////////////
编译0.11-0.16版本报错如下:make
go fmt ./...
go build -o bin/frps ./cmd/frps

_/home/**/Downloads/frp-0.11.0/cmd/frps

cmd/frps/main.go:63:2: undefined: config.ServerCommonCfg
cmd/frps/main.go:63:32: undefined: config.LoadServerCommonConf
cmd/frps/main.go:71:4: undefined: config.ServerCommonCfg
cmd/frps/main.go:73:4: undefined: config.ServerCommonCfg
cmd/frps/main.go:74:4: undefined: config.ServerCommonCfg
cmd/frps/main.go:79:3: undefined: config.ServerCommonCfg
cmd/frps/main.go:93:3: undefined: config.ServerCommonCfg
cmd/frps/main.go:94:3: undefined: config.ServerCommonCfg
cmd/frps/main.go:104:14: undefined: config.ServerCommonCfg
cmd/frps/main.go:105:3: undefined: config.ServerCommonCfg
cmd/frps/main.go:105:3: too many errors
make: *** [frps] Error 2

///////////////////////
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 @ghost on GitHub (Oct 19, 2018). Original GitHub issue: https://github.com/fatedier/frp/issues/946 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 将会直接关闭。) 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)?** 0.8-0.16尝试过 **What operating system and processor architecture are you using (`go env`)?** linux amd64 ubuntu **Configures you used:** [common] server_addr =************* server_port = 7000 privilege_token = 123456 admin_addr=127.0.0.1 admin_port=7400 log_level = error log_max_days = 3 [SSH] type = tcp local_ip = 127.0.0.1 local_port = 22 remote_port=6001 **Steps to reproduce the issue:** 1.尝试编译frp,在Ubuntu14.04 64位,安装go版本1.91,编译0.1-0.7都可以通过 2.但是编译0.8以上版本报错 3. **Describe the results you received:** /////////////////////////编译0.8版本报错如下:make go fmt ./src/... go build -o bin/frps ./src/cmd/frps src/cmd/frps/main.go:29:2: cannot find package "github.com/fatedier/frp/src/assets" in any of: /usr/local/go/src/github.com/fatedier/frp/src/assets (from $GOROOT) /home/**/gocode/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/go/src/github.com/fatedier/frp/src/models/consts (from $GOROOT) /home/**/gocode/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/msg" in any of: /usr/local/go/src/github.com/fatedier/frp/src/models/msg (from $GOROOT) /home/**/gocode/src/github.com/fatedier/frp/src/models/msg (from $GOPATH) src/cmd/frps/control.go:25:2: cannot find package "github.com/fatedier/frp/src/models/server" in any of: /usr/local/go/src/github.com/fatedier/frp/src/models/server (from $GOROOT) /home/**/gocode/src/github.com/fatedier/frp/src/models/server (from $GOPATH) src/cmd/frps/control.go:26:2: cannot find package "github.com/fatedier/frp/src/utils/conn" in any of: /usr/local/go/src/github.com/fatedier/frp/src/utils/conn (from $GOROOT) /home/**/gocode/src/github.com/fatedier/frp/src/utils/conn (from $GOPATH) src/cmd/frps/control.go:27:2: cannot find package "github.com/fatedier/frp/src/utils/log" in any of: /usr/local/go/src/github.com/fatedier/frp/src/utils/log (from $GOROOT) /home/**/gocode/src/github.com/fatedier/frp/src/utils/log (from $GOPATH) src/cmd/frps/control.go:28:2: cannot find package "github.com/fatedier/frp/src/utils/pcrypto" in any of: /usr/local/go/src/github.com/fatedier/frp/src/utils/pcrypto (from $GOROOT) /home/**/gocode/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/go/src/github.com/fatedier/frp/src/utils/version (from $GOROOT) /home/**/gocode/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/go/src/github.com/fatedier/frp/src/utils/vhost (from $GOROOT) /home/**/gocode/src/github.com/fatedier/frp/src/utils/vhost (from $GOPATH) ///////////////////////// 编译0.11-0.16版本报错如下:make go fmt ./... go build -o bin/frps ./cmd/frps # _/home/**/Downloads/frp-0.11.0/cmd/frps cmd/frps/main.go:63:2: undefined: config.ServerCommonCfg cmd/frps/main.go:63:32: undefined: config.LoadServerCommonConf cmd/frps/main.go:71:4: undefined: config.ServerCommonCfg cmd/frps/main.go:73:4: undefined: config.ServerCommonCfg cmd/frps/main.go:74:4: undefined: config.ServerCommonCfg cmd/frps/main.go:79:3: undefined: config.ServerCommonCfg cmd/frps/main.go:93:3: undefined: config.ServerCommonCfg cmd/frps/main.go:94:3: undefined: config.ServerCommonCfg cmd/frps/main.go:104:14: undefined: config.ServerCommonCfg cmd/frps/main.go:105:3: undefined: config.ServerCommonCfg cmd/frps/main.go:105:3: too many errors make: *** [frps] Error 2 /////////////////////// **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

@fatedier commented on GitHub (Nov 8, 2018):

请参照正常的 Go 项目进行安装编译。

<!-- gh-comment-id:436863259 --> @fatedier commented on GitHub (Nov 8, 2018): 请参照正常的 Go 项目进行安装编译。
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#752
No description provided.