无法安装gin-gonic:c.engine.AppEngine undefined(类型*引擎没有字段或方法AppEngine)



我无法为我的golang项目安装gin-gonic。我试着重新安装go,重置bash文件,删除并重新创建项目文件夹,并在谷歌上搜索错误作为关键字,但没有找到

以下是我的终端信息:

$ go get -u github.com/gin-gonic/gin
# github.com/gin-gonic/gin
........gopkgmodgithub.comgin-gonicgin@v1.7.5context.go:735:13: c.engine.AppEngine undefined (type *Engine has no field or method AppEngine)
........gopkgmodgithub.comgin-gonicgin@v1.7.5gin.go:154:3: unknown field 'UseRawPath' in struct literal of type Engine
........gopkgmodgithub.comgin-gonicgin@v1.7.5gin.go:156:3: unknown field 'UnescapePathValues' in struct literal of type Engine
........gopkgmodgithub.comgin-gonicgin@v1.7.5gin.go:508:11: engine.UseRawPath undefined (type *Engine has no field or method UseRawPath)
........gopkgmodgithub.comgin-gonicgin@v1.7.5gin.go:510:20: engine.UnescapePathValues undefined (type *Engine has no field or method UnescapePathValues)

我降级到v1.7.2,一切都很好。看看https://github.com/gin-gonic/gin/issues/2948

我在使用gin@v1.7.5,所以我降级为gin@v1.7.4,并且它运行良好

我也遇到了同样的问题。但我在ubuntu上用root解决了这个问题。同样地,用";以管理员身份运行";

相关内容

  • 没有找到相关文章

最新更新