我正在尝试安装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
就像here一样,但是它可以永远运行。
最佳答案
如果strings.ReplaceAll
未定义,则意味着您使用的Go早于1.12,即添加该函数的版本。
要安装该软件包,您需要先将Go版本更新为1.12之后的版本(最好是最新版本)。
关于linux - 安装失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63293731/