MiSecurity / x-patrol

github泄露扫描系统
1.15k stars 303 forks source link

在Kali下go build main.go错误 #5

Closed Tren closed 6 years ago

Tren commented 6 years ago

hely8dvx r 7fw__ f88p0

madneal commented 6 years ago

这不很明显么 依赖没装。。。

netxfly commented 6 years ago

嗯,配置好go环境,然后把项目放到$GOPATH/src目录下,然后go build一下,把提示没安装的包全go get安装好就可以了。

xiaoheiwo commented 5 years ago

你好,我想问一下 x-patrol/cmd的包怎么安装

netxfly commented 5 years ago

你好,我想问一下 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
liqinshan commented 5 years ago

确定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"

image

netxfly commented 5 years ago

确定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"

image

关掉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