-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build in debain,and run in centos 7,the erroy msg is very strange. #2908
Comments
build in debain 11 and run in debain 10 is also same erroy |
I remove the router code : s.Group("/" s.BindHandler("/", func(r *ghttp.Request) {
r.Response.Write("哈喽世界!")
})
s.BindHandler("/ip", func(r *ghttp.Request) {
_, hip := util.GetIpFromRequest(r)
r.Response.Write(hip)
}) it works so looks like this is goframe problem? |
server.routeOverWrite gf/net/ghttp/ghttp_server_config.go Line 247 in 4fc24e1
https://goframe.org/pages/viewpage.action?pageId=44449486 |
the key is : if I build in debain and run in same ecs,everything is ok . |
那么你尝试一下,在你说的系统中构建,然后放到其它任意不相关的目录执行试试,不要复制配置文件。 |
Then you try it, build it in the system you mentioned, and then put it in any other unrelated directory to try it out, don't copy the configuration file. |
单从你所展示的报错来看,和配置server.routeOverWrite的相关性极大。 |
Judging from the error report you have shown, it is very related to configuring server.routeOverWrite. |
我是直接git clone https://github.com/gogf/gf-demo-user.git编译的 一行代码都没修改 |
@JsonSong89 Go的特性之一就是跨平台性,交叉编译,debian和centos都是属于linux平台,只要保证architecture编译架构是一致的就可以运行。你的报错是配置问题,路由覆盖问题,官方的配置文件会有一个路由覆盖的配置,主要母的是可以在中间中使用接口鉴权。 |
@JsonSong89 One of the features of Go is cross-platform and cross-compilation. Both debian and centos belong to the Linux platform. As long as the architecture compilation structure is consistent, it can run. Your error is a configuration issue and a routing coverage issue. The official configuration file will have a routing coverage configuration. The main reason is that interface authentication can be used in the middle. |
1. What version of
Go
and system type/arch are you using?2. What version of
GoFrame
are you using?v2.3.3
3. Can this issue be re-produced with the latest release?
debain
gcc --version #gcc (Debian 10.2.1-6) 10.2.1 20210110 git clone https://github.com/gogf/gf-demo-user.git go build
centos
5. What did you expect to see?
centos run fine or show the root cause error msg
I notice the gcc version has big diff? is there the reason?
but why centOS can run the build file ?
The text was updated successfully, but these errors were encountered: