Open khughitt opened 3 years ago
On most Linux distributions, it looks something like this:
Arch Linux should be the same. Basically, GOROOT is the system bit that's shared between all users on the system, GOPATH is just for you and contains a bin/, src/ and pkg/ directory. When you run go get, it should end up in GOPATH.
Hi @Sentimentron,
Thanks for taking the time to respond, and for the clarifications!
It seems like my system is indeed configured properly then, but for some reason, the source code is not be pulled, e.g.:
~/go
❯ echo $GOPATH
/home/<user>/go
~/go
❯ cd $GOPATH/src/github.com/sjwhitworth/golearn
cd: no such file or directory: /home/<user>/go/src/github.com/sjwhitworth/golearn
❯ go get -t -u -v github.com/sjwhitworth/golearn
go: github.com/sjwhitworth/golearn upgrade => v0.0.0-20210117164941-cde96fa8267f
~/go
❯ fd golearn
bin/pkg/mod/cache/download/github.com/sjwhitworth/golearn
bin/pkg/mod/cache/download/sumdb/sum.golang.org/lookup/github.com/sjwhitworth/golearn@v0.0.0-20210117164941-cde96fa8267f
bin/pkg/mod/github.com/sjwhitworth/golearn@v0.0.0-20210117164941-cde96fa8267f
bin/pkg/mod/github.com/sjwhitworth/golearn@v0.0.0-20210117164941-cde96fa8267f/golearn.go
pkg/mod/cache/download/github.com/sjwhitworth/golearn
pkg/mod/cache/download/sumdb/sum.golang.org/lookup/github.com/sjwhitworth/golearn@v0.0.0-20210117164941-cde96fa8267f
pkg/mod/github.com/sjwhitworth/golearn@v0.0.0-20210117164941-cde96fa8267f
pkg/mod/github.com/sjwhitworth/golearn@v0.0.0-20210117164941-cde96fa8267f/golearn.go
I also tried adding the "-d" switch, which, according to the help:
The -d flag instructs get to download the source code needed to build the named packages, including downloading necessary dependencies, but not to build and install them.
But that had no impact either..
Any ideas what the issue could be?
Also, Is the note about $GOPATH including $GOROOT + "bin/" OS X specific then? If so, perhaps it could be useful to add a note in the README to that effect?
Version Info:
Greetings!
I noticed that the golearn Wiki currently only lists Ubuntu/OpenSUSE as being supported linux platforms.
Is this still the case?
I started following the installation instructions, just to see if it would work, but I ran into issues related to the handling of
GOROOT
/GOPATH
..Whereas golearn suggests setting
GOROOT=$HOME/go
and$GOPATH=$HOME/go/bin
, the arch wiki suggests thatGOPATH
should be~/go
instead.When I attempted to follow the conventions from the golearn install docs, when attempting to call
go get
, I run into the following issue:(
compile
lives/usr/lib/go/pkg/tool/linux_amd64/
on arch linux, where$GOROOT
is typically set to/usr/lib/go
...)When attempting to use the Arch conventions, the
go get
command succeeds, but the source code for golearn doesn't appear to be pulled, so the$GOPATH/src/github.com/sjwhitworth/golearn
path does not exist.It seems likely that I'm simply misunderstanding something about how
GOPATH
andGOROOT
work, and how they interact withgo get
..Has anyone had luck working with golearn on arch linux?
Any advice would be greatly appreciated.