FAQ
Can someone help me out with this error? I'm obviously missing something
really obvious; but errors is clearly in my GOPATH.

Ahh, I cannot name the package "errors". Why?

$ go install
go install: no install location for directory /home/daniel/Development/src/errors outside GOPATH
$ go env
GOARCH="amd64"
GOBIN=""
GOCHAR="6"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/daniel/Development"
GORACE=""
GOROOT="/usr/local/src/go"
GOTOOLDIR="/usr/local/src/go/pkg/tool/linux_amd64"
CC="gcc"
GOGCCFLAGS="-g -O2 -fPIC -m64 -pthread"
CGO_ENABLED="1"


--
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

  • Dave Cheney at Jun 25, 2013 at 12:13 am
    errors is already owned by the standard library.

    Try again with something like fmt or image/gif. If this is the same
    error, then please raise a bug, the go tool should detect this
    earlier* and give a better error

    Dave

    * i believe the Go tool is compiling the pkg to a temp directory then
    getting confused because the normal path that errors would be
    installed to, $GOROOT/pkg/$GOOS_$GOARCH/ is rightly not inside
    $GOPATH.

    On Tue, Jun 25, 2013 at 10:09 AM, Dan Kortschak
    wrote:
    Can someone help me out with this error? I'm obviously missing something
    really obvious; but errors is clearly in my GOPATH.

    Ahh, I cannot name the package "errors". Why?

    $ go install
    go install: no install location for directory /home/daniel/Development/src/errors outside GOPATH
    $ go env
    GOARCH="amd64"
    GOBIN=""
    GOCHAR="6"
    GOEXE=""
    GOHOSTARCH="amd64"
    GOHOSTOS="linux"
    GOOS="linux"
    GOPATH="/home/daniel/Development"
    GORACE=""
    GOROOT="/usr/local/src/go"
    GOTOOLDIR="/usr/local/src/go/pkg/tool/linux_amd64"
    CC="gcc"
    GOGCCFLAGS="-g -O2 -fPIC -m64 -pthread"
    CGO_ENABLED="1"


    --
    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.
    --
    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.
  • Dan Kortschak at Jun 25, 2013 at 12:33 am
    Yes, I figured that when I changed the package name. It seems to be an
    unfortunate collision of me using errors as the package and working at
    the base of my GOPATH out of laziness. I was surprised as I have an
    errors package that is deeper in my GOPATH which works fine, but you
    explanation makes perfect sense.

    Yes, fmt does the same thing:

    $ go install
    go install: no install location for directory /home/daniel/Development/src/fmt outside GOPATH

    http://code.google.com/p/go/issues/detail?id=5774

    thanks
    Dan
    On Tue, 2013-06-25 at 10:13 +1000, Dave Cheney wrote:
    errors is already owned by the standard library.

    Try again with something like fmt or image/gif. If this is the same
    error, then please raise a bug, the go tool should detect this
    earlier* and give a better error

    Dave

    --
    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.
  • Dave Cheney at Jun 25, 2013 at 12:39 am
    Thanks for raising the issue. The root cause is, some names are
    reserved for the standard library. How we handle that could be a
    subject of debate. Eg, do we compile $GOPATH/src/errors into
    $GOPATH/pkg/$GOOS_$GOARCH/errors.a? If so, you'll never be able to
    reference it.

    On Tue, Jun 25, 2013 at 10:33 AM, Dan Kortschak
    wrote:
    Yes, I figured that when I changed the package name. It seems to be an
    unfortunate collision of me using errors as the package and working at
    the base of my GOPATH out of laziness. I was surprised as I have an
    errors package that is deeper in my GOPATH which works fine, but you
    explanation makes perfect sense.

    Yes, fmt does the same thing:

    $ go install
    go install: no install location for directory /home/daniel/Development/src/fmt outside GOPATH

    http://code.google.com/p/go/issues/detail?id=5774

    thanks
    Dan
    On Tue, 2013-06-25 at 10:13 +1000, Dave Cheney wrote:
    errors is already owned by the standard library.

    Try again with something like fmt or image/gif. If this is the same
    error, then please raise a bug, the go tool should detect this
    earlier* and give a better error

    Dave
    --
    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
postedJun 25, '13 at 12:09a
activeJun 25, '13 at 12:39a
posts4
users2
websitegolang.org

2 users in discussion

Dave Cheney: 2 posts Dan Kortschak: 2 posts

People

Translate

site design / logo © 2022 Grokbase