Closed Tren closed 6 years ago
这不很明显么 依赖没装。。。
嗯,配置好go环境,然后把项目放到$GOPATH/src目录下,然后go build一下,把提示没安装的包全go get安装好就可以了。
你好,我想问一下 x-patrol/cmd的包怎么安装
你好,我想问一下 x-patrol/cmd的包怎么安装
cd $GOPATH/src
git clone https://github.com/MiSecurity/x-patrol
# 项目放到$GOPATH/src/目录下,然后安装以下依赖
go get github.com/etsy/hound/codesearch/sparse
go get github.com/go-macaron/cache
go get github.com/go-macaron/captcha
go get github.com/go-macaron/csrf
go get github.com/go-macaron/session
go get github.com/go-sql-driver/mysql
go get github.com/go-xorm/core
go get github.com/go-xorm/xorm
go get github.com/google/go-github/github
go get github.com/lib/pq
go get github.com/sirupsen/logrus
go get github.com/urfave/cli
go get github.com/x-cray/logrus-prefixed-formatter
go get golang.org/x/oauth2
go get gopkg.in/ini.v1
go get gopkg.in/macaron.v1
go build main.go
确定codesearch能安装成功? x-patrol|master⚡ ⇒go get github.com/etsy/hound/codesearch/sparse go: finding github.com/etsy/hound/codesearch/sparse latest go: finding github.com/etsy/hound/codesearch latest go get github.com/etsy/hound/codesearch/sparse: no matching versions for query "latest"
确定codesearch能安装成功? x-patrol|master⚡ ⇒go get github.com/etsy/hound/codesearch/sparse go: finding github.com/etsy/hound/codesearch/sparse latest go: finding github.com/etsy/hound/codesearch latest go get github.com/etsy/hound/codesearch/sparse: no matching versions for query "latest"
关掉go mod试下:
export GO111MODULE=auto
cd $GOPATH/src
git clone https://github.com/MiSecurity/x-patrol
# 项目放到$GOPATH/src/目录下,然后安装以下依赖
go get github.com/etsy/hound/codesearch/sparse
go get github.com/go-macaron/cache
go get github.com/go-macaron/captcha
go get github.com/go-macaron/csrf
go get github.com/go-macaron/session
go get github.com/go-sql-driver/mysql
go get github.com/go-xorm/core
go get github.com/go-xorm/xorm
go get github.com/google/go-github/github
go get github.com/lib/pq
go get github.com/sirupsen/logrus
go get github.com/urfave/cli
go get github.com/x-cray/logrus-prefixed-formatter
go get golang.org/x/oauth2
go get gopkg.in/ini.v1
go get gopkg.in/macaron.v1
go build main.go