我目前在我的树莓派模型B+上使用Raspbian。我已经安装了Go,并且想要安装scollector。我试过了
$ go get bosun.org/cmd/scollector但是得到了错误
package net/http/cookiejar: unrecognized import path "net/http/cookiejar"我还尝试通过ARMv6二进制文件进行安装。我在二进制文件上运行chmod +x命令,然后尝试使用./scollector-linux-armv6执行它,但得到一个错误,显示"Text file busy“。
发布于 2015-07-18 09:10:12
这条消息出现在https://github.com/revel/revel/issues/342上:你的发行版可能有旧版本的Go,但它没有那个包。你可以从Dave Cheney's site下载ARMv6的最新go (在我写这篇文章的时候是1.4.2)。您可能希望将其解压,将生成的目录移动/重命名为~/go,并通过添加以下行来更改.bashrc以在您的move目录中设置路径和GOPATH:
# optional; makes bin/, pkg/ and src/ under your homedir for Go
export GOPATH=~
# puts the 'go' tool + built go binaries + anything else in ~/bin in PATH
# remove the :~/bin bit if you don't want it
export PATH=~/go/bin:~/bin/:$PATH
# lets Go know that it's not in /usr/local/go
export GOROOT=~/go然后使用. ~/bashrc或注销并登录,将最新版本放入您的环境中。然后你可能会遇到其他问题;如果你卡住了,可能会把这些问题作为附加问题发布,并尽可能地提供所有细节和对这个问题的引用。如果您使用另一个-specific,则bash shell的详细信息会有所不同。
您还可以(正如用户allonhadaya指出的那样)交叉编译:构建从台式机或笔记本电脑传输到Raspberry Pi的二进制文件。In Go 1.5, scheduled to come out at the end of 2015, it will get simpler.
"Text file busy“紧跟在chmod后面,显然是something that happens。在chmod和运行二进制文件之间运行sync可能会有所帮助。如果文件仍在下载,则可能会发生这种情况。无论哪种方式,拥有一个Go环境对于你想要构建的任何其他项目或者你想要自己做的任何编码都是有用的。
祝你在做的事情上好运!
https://stackoverflow.com/questions/31483734
复制相似问题