I am trying to install the find server, the internal positioning (https://github.com/schollz/find) (https://www.internalpositioning.com/) software that has a server for on the Raspberry Pi (3).
The install works by using golang, and I cannot quite figure out how to make go(lang) install the find package. The directions given on the otherwise helpful install page (https://www.internalpositioning.com/server/) are to install go (which I have done by $ sudo apt-get install golang) and that indeed does tell me that I have go version go1.7.4 linux/arm (command $ go version
).
Additionally I have set the root paths so that the Raspberry Pi actually knows where to find go:
export GOROOT=/usr/local/go
export GOPATH=$HOME/go
export PATH=$PATH:$GOROOTH/bin
We then proceed with the actual commands to install find (internal positioning software server) by cloning it from github and installing it with go(lang); via the following commands.
$ git clone https://github.com/schollz/find.git
$ cd find
$ go get ./...
$ go build
I cannot get the '/find $ go get ./...' command to work with whatever parameters I put in. Clearly the command needs input parameters / directories but none of the input paths I have tried seem to work, and I cannot figure out which one it wants from googling the issue or indeed looking it up on stackoverflow.
Running '/find $ go get ./...' does not appear to give me any response from the raspberry pi; there is not message that it is doing something and the raspberry pi cpu percentage stays low; after 5 - 10 minutes I get:
# cd .; git clone https://github.com/foo/vendored /home/pi/go/src/github.com/foo/vendored
Cloning into '/home/pi/go/src/github.com/foo/vendored'...
fatal: could not read Username for 'https://github.com': terminal prompts disabled
package github.com/foo/vendored: exit status 128
Password:
which does not help me a whole lot either. Running it by pointing golang towards the go github location also does not yield anything promising:
/find $ go get https://github.com/schollz/find.git
package https:/github.com/schollz/find.git: "https://" not allowed in import path
nor does
/find $ go get /home/pi./find
package /home/pi./find: unrecognized import path "/home/pi./find" (import path does not begin with hostname)
I have no clue what go wants of me; anyone able to shed a light?
EDIT: I seem to have fixed the issue where the gopath is not being found correctly: rather than using export GOPATH=$HOME/go
I have used GOPATH=$HOME/go
; no idea why that fixes things.
I now get the error when I use the command $ go get ./...
find $ go get ./...
# cd .; git clone https://github.com/foo/vendored /home/pi/go/src/github.com/foo/vendored
Cloning into '/home/pi/go/src/github.com/foo/vendored'...
fatal: could not read Username for 'https://github.com': terminal prompts disabled
package github.com/foo/vendored: exit status 128
Password:
Indicating I would need to login: however I cannot seem to make this happen either.
go get disable "terminal prompt" by default. This can be changed by set the env of git:
env GIT_TERMINAL_PROMPT=1 go get github.com/schollz/find/...