登录
首页 >  Golang >  Go问答

安装失败

来源:stackoverflow

时间:2024-04-23 19:39:30 191浏览 收藏

大家好,今天本人给大家带来文章《安装失败》,文中内容主要涉及到,如果你对Golang方面的知识点感兴趣,那就请各位朋友继续看下去吧~希望能真正帮到你们,谢谢!

问题内容

我尝试安装 gospider 和其他工具,但收到此错误

sudo go get -u github.com/jaeles-project/gospider
../../go/src/github.com/jaeles-project/gospider/core/crawler.go:28:20: unknown field 'MaxConnsPerHost' in struct literal of type http.Transport
../../go/src/github.com/jaeles-project/gospider/core/crawler.go:184:21: undefined: strings.ReplaceAll
../../go/src/github.com/jaeles-project/gospider/core/crawler.go:297:35: undefined: strings.ReplaceAll
../../go/src/github.com/jaeles-project/gospider/core/linkfinder.go:14:12: undefined: strings.ReplaceAll
../../go/src/github.com/jaeles-project/gospider/core/linkfinder.go:15:12: undefined: strings.ReplaceAll

我尝试更新 sudo go get -u all 与此处一样,但它会永远运行。


解决方案


如果 strings.ReplaceAll 未定义,则意味着您使用的是 1.12 之前的 Go 版本,即添加该函数的时间。

要安装该软件包,您需要首先将 Go 版本更新到 1.12 之后的版本(最好是最新版本)。

到这里,我们也就讲完了《安装失败》的内容了。个人认为,基础知识的学习和巩固,是为了更好的将其运用到项目中,欢迎关注golang学习网公众号,带你了解更多关于的知识点!

声明:本文转载于:stackoverflow 如有侵犯,请联系study_golang@163.com删除
相关阅读
更多>
最新阅读
更多>
课程推荐
更多>