FAQ
Dear All

When I do a `go install` in my source directory with package
main in it, it installs the binary into my GOROOT/bin not my
GOPATH/bin. What stupid thing am I likely to be doing?

Go version: tip as of five minutes ago

go version devel +e77430da3316 Thu Apr 04 16:36:10 2013 +1100 linux/amd64

Running Fedora 16 on a 64-bit x86.

Directory structure

sideways: find
.
./bin
./pkg
./src
./src/assess
./src/assess/main.go

GOPATH points to this directory:

sideways: echo $GOPATH
/home/chris/sideways

Environment:

assess: go env
GOARCH="amd64"
GOBIN="/home/chris/bin/gobin"
GOCHAR="6"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/chris/sideways"
GORACE=""
GOROOT="/home/chris/Go/Root"
GOTOOLDIR="/home/chris/Go/Root/pkg/tool/linux_amd64"
CC="gcc"
GOGCCFLAGS="-g -O2 -fPIC -m64 -pthread"
CGO_ENABLED="1"

Any ideas?

--
Chris "blockhead" Dollin

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • DisposaBoy at Apr 4, 2013 at 5:11 pm
    I dunno but are you sure it's $GOROOT/bin and not $GOBIN?

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Chris dollin at Apr 4, 2013 at 6:04 pm
    Hmm, at home it works properly. I've clearly messed up my env
    variables at work somehow. At least I have something to compare with
    now.

    Chris

    On 4 April 2013 16:20, chris dollin wrote:

    Dear All

    When I do a `go install` in my source directory with package
    main in it, it installs the binary into my GOROOT/bin not my
    GOPATH/bin. What stupid thing am I likely to be doing?

    Go version: tip as of five minutes ago

    go version devel +e77430da3316 Thu Apr 04 16:36:10 2013 +1100 linux/amd64

    Running Fedora 16 on a 64-bit x86.

    Directory structure

    sideways: find
    .
    ./bin
    ./pkg
    ./src
    ./src/assess
    ./src/assess/main.go

    GOPATH points to this directory:

    sideways: echo $GOPATH
    /home/chris/sideways

    Environment:

    assess: go env
    GOARCH="amd64"
    GOBIN="/home/chris/bin/gobin"
    GOCHAR="6"
    GOEXE=""
    GOHOSTARCH="amd64"
    GOHOSTOS="linux"
    GOOS="linux"
    GOPATH="/home/chris/sideways"
    GORACE=""
    GOROOT="/home/chris/Go/Root"
    GOTOOLDIR="/home/chris/Go/Root/pkg/tool/linux_amd64"
    CC="gcc"
    GOGCCFLAGS="-g -O2 -fPIC -m64 -pthread"
    CGO_ENABLED="1"

    Any ideas?

    --
    Chris "blockhead" Dollin


    --
    Chris "allusive" Dollin

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedApr 4, '13 at 3:20p
activeApr 4, '13 at 6:04p
posts3
users2
websitegolang.org

2 users in discussion

Chris dollin: 2 posts DisposaBoy: 1 post

People

Translate

site design / logo © 2022 Grokbase