为什么我在尝试设置 Google 安全浏览数据库时收到'sbserver not found'错误?



我到达了这个github repo。关于Google安全浏览数据库。

我从未使用过,但是我认为现在需要它。所以我使用以下方式安装了它:

sudo apt install golang-go

然后,我遵循GitHub页面中的说明。我执行:

go get github.com/google/safebrowsing

,但是我从我执行命令的路径中没有安装。但是,我继续进行:

export PATH=$PATH:$GOPATH/bin

然后手册说,运行以下命令(这是两行,我执行了第一行,然后按Enter,然后什么也没有更改。然后分别执行第二行:

go get github.com/google/safebrowsing/cmd/sbserver
sbserver -apikey $APIKEY

执行第二行后,我得到了此错误:

Command 'sbserver' not found, did you mean:
  command 'sxserver' from deb sx
  command 'sb_server' from deb spambayes
  command 'ssserver' from deb shadowsocks
Try: sudo apt install <deb name>

你能指向我什么问题吗?如何安装Google安全浏览数据库?

您的路径是错误的。您将在$GOPATH/bin中找到sbserver

尝试${GOPATH}/bin/sbserver -apikey $APIKEY

如果不起作用,请按照GO安装说明进行操作,并确保您的GO环境变量正确。

gopath看起来像/home/myname/go或其他看起来正常的东西。

您的路径应包含${GOPATH}/bin

最新更新