[GH-ISSUE #385] 编译出错 #282

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

Originally created by @kumake on GitHub (Jun 29, 2017).
Original GitHub issue: https://github.com/fatedier/frp/issues/385

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)?
最新的版本

Describe the results you received:
编译的时候出现如下错误:
wangqiuyang@iwg-compile:~/ddd/src/github.com/fatedier/frp$ make
go fmt ./assets/...
go fmt ./client/...
go fmt ./cmd/...
go fmt ./models/...
go fmt ./server/...
go fmt ./utils/...
go build -o bin/frps ./cmd/frps
go build -o bin/frpc ./cmd/frpc

github.com/fatedier/frp/models/plugin

models/plugin/http_proxy.go:134: hp.s.Close undefined (type *http.Server has no field or method Close)
Makefile:30: recipe for target 'frpc' failed
make: *** [frpc] Error 2

我用的go语言版本是1.7.4
如果把models/plugin/http_proxy.go文件的134行hp.s.Close()注释掉,编译就通过。
是不是在1.7.4版本的GO语言库*http.Server不支持Close()方法?如何解决向后兼容问题?

Originally created by @kumake on GitHub (Jun 29, 2017). Original GitHub issue: https://github.com/fatedier/frp/issues/385 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)?** 最新的版本 **Describe the results you received:** 编译的时候出现如下错误: wangqiuyang@iwg-compile:~/ddd/src/github.com/fatedier/frp$ make go fmt ./assets/... go fmt ./client/... go fmt ./cmd/... go fmt ./models/... go fmt ./server/... go fmt ./utils/... go build -o bin/frps ./cmd/frps go build -o bin/frpc ./cmd/frpc # github.com/fatedier/frp/models/plugin models/plugin/http_proxy.go:134: hp.s.Close undefined (type *http.Server has no field or method Close) Makefile:30: recipe for target 'frpc' failed make: *** [frpc] Error 2 我用的go语言版本是1.7.4 如果把models/plugin/http_proxy.go文件的134行hp.s.Close()注释掉,编译就通过。 是不是在1.7.4版本的GO语言库*http.Server不支持Close()方法?如何解决向后兼容问题?
Author
Owner

@fatedier commented on GitHub (Jun 29, 2017):

Use go1.8.3

<!-- gh-comment-id:311855624 --> @fatedier commented on GitHub (Jun 29, 2017): Use go1.8.3
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#282
No description provided.