This is a creation in Article, where the information may have evolved or changed.
In the use of Bleve this full-text search engine, (note: Bleve pronunciation can use Chinese "bravur") there are some errors, some of the dependency package cannot be found, resulting in unable to continue, below do some detailed instructions.
Compile error message
"golang.org/x/net/context"in any of:.../projects/go-projects/src/github.com/blevesearch/bleve/vendor/golang.org/x/net/context (vendor tree)/usr/local/go/src/golang.org/x/net/context (from $GOROOT).../projects/go-projects/src/golang.org/x/net/context (from $GOPATH)
Tentative solution
- $
go get golang.org/x/net/...
- $
go get golang.org/x/net/context
- The above scenario does not work, cannot be downloaded, and the result shows a
timeout
timeout
Final Solution
cd srcmkdir golang.orgcd golang.orgxxgit clone git@github.com:golang/net.git1
- Description, create a directory under the SRC directory, such as:
src/golang.org/x/
- In the X directory, make a clone of the warehouse $
git clone git@github.com:golang/net.git --depth 1
- Try compiling again, this issue is resolved
Reference
- https://github.com/blevesearch/bleve/issues/624
- https://github.com/beego/admin/issues/55