Hi Justin,

On Sat, Oct 24, 2015 at 6:12 PM, Justin Mclean <[email protected]> wrote:
> Hi,
>
> I followed the steps here[1] but have run into an issue when running "go get 
> github.com/tools/godep”.
>
> package bufio: unrecognized import path "bufio"
> package bytes: unrecognized import path "bytes"
> package encoding/json: unrecognized import path "encoding/json"
> package encoding/xml: unrecognized import path "encoding/xml"
> package errors: unrecognized import path "errors"
> …. and lots more ….
>
> $echo $GOPATH
> /Users/justinmclean/dev/go
> $ echo $GOROOT
> /usr/local/Cellar/go
> $ which go
> /usr/local/bin/go
> $ ls -l /usr/local/bin/go
> lrwxr-xr-x  1 justinmclean  admin  25 25 Oct 11:25 /usr/local/bin/go -> 
> ../Cellar/go/1.4.2/bin/go
> $go version
> go version go1.4.2 darwin/amd64
>
> I’m running on OS X Yosemite.
>

That's odd. I'm running the exact same version of go, and don't have
this problem.  Only difference is my $GOROOT, perhaps try setting that
to the same as mine?

For reference:

$ echo $GOROOT
/usr/local/Cellar/go/1.4.2/libexec
$ echo $GOPATH
/Users/sterling/dev/go/
$ which go
/usr/local/bin/go
$ ls -l /usr/local/bin/go
lrwxr-xr-x  1 sterling  admin  25 May 28 14:03 /usr/local/bin/go ->
../Cellar/go/1.4.2/bin/go
$ go version
go version go1.4.2 darwin/amd64


> A look at stack overflow/google shows a few people with similar issues and it 
> seem the answer was to unset GOROOT. so it looks like GOROOT should not be 
> set in the first place? Anyone more familiar with go can explain why that  
> was required?
>

I'll poke at this.  Can you try setting GOROOT as mentioned above, and
let me know if that works?

> There also a couple of minor issues with the setting instructions for 
> instance this:
>  go run %GOPATH%/src/github.com/mynewt/newt/newt.go
> Should be this I think:
>  go run $GOPATH/src/github.com/mynewt/newt/newt.go
>

Yep.

Reply via email to