Skip to content
Advertisement

Failed to install

I was trying to install gospider and other tools,I get this error

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

I tried to update sudo go get -u all as in here but it runs forever.

Advertisement

Answer

If strings.ReplaceAll is undefined that means you’re using a version of Go prior to 1.12, which is when that function was added.

To install that package, you need to first update your Go version to something after 1.12 (ideally the latest version).

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement