FAQ
I wanted to update Golang

But sudo apt-get install golang was not updating it.

So I followed these
steps: https://gist.github.com/PistachioPony/06c3ca4a3310b8f46596
Go the link from this
post: https://groups.google.com/forum/#!searchin/golang-nuts/debian|sort:relevance/golang-nuts/7G72OlUKMeI/ByKX4MYZ7tkJ

It worked.
But now I am unable to run my project.

It gives 'cannot find package error'

http.go:4:2: cannot find package "fmt" in any of:
/usr/lib/go/src/fmt (from $GOROOT)
/home/devUser/go-projects/src/fmt (from $GOPATH)

  go env is:

GOARCH="amd64"
GOBIN="/usr/bin/go"
GOCHAR="6"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/devUser/go-projects"
GORACE=""
GOROOT="/usr/lib/go"
GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0"
CXX="g++"
CGO_ENABLED="1"

Can someone please help

--
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/d/optout.

Search Discussions

  • James Bardin at Aug 26, 2015 at 2:41 pm
    If you followed those directions, your go installation is in /usr/local/go,
    not /usr/llib/go.

    Unset GOROOT.


    On Wednesday, August 26, 2015 at 9:44:24 AM UTC-4, User123 wrote:

    I wanted to update Golang

    But sudo apt-get install golang was not updating it.

    So I followed these steps:
    https://gist.github.com/PistachioPony/06c3ca4a3310b8f46596
    Go the link from this post:
    https://groups.google.com/forum/#!searchin/golang-nuts/debian|sort:relevance/golang-nuts/7G72OlUKMeI/ByKX4MYZ7tkJ

    It worked.
    But now I am unable to run my project.

    It gives 'cannot find package error'

    http.go:4:2: cannot find package "fmt" in any of:
    /usr/lib/go/src/fmt (from $GOROOT)
    /home/devUser/go-projects/src/fmt (from $GOPATH)

    go env is:

    GOARCH="amd64"
    GOBIN="/usr/bin/go"
    GOCHAR="6"
    GOEXE=""
    GOHOSTARCH="amd64"
    GOHOSTOS="linux"
    GOOS="linux"
    GOPATH="/home/devUser/go-projects"
    GORACE=""
    GOROOT="/usr/lib/go"
    GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
    CC="gcc"
    GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0"
    CXX="g++"
    CGO_ENABLED="1"

    Can someone please help
    --
    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/d/optout.
  • Ian Lance Taylor at Aug 26, 2015 at 4:55 pm

    On Wed, Aug 26, 2015 at 7:40 AM, James Bardin wrote:
    If you followed those directions, your go installation is in /usr/local/go,
    not /usr/llib/go.

    Unset GOROOT.
    In general, never set GOROOT. If some web page recommended that you
    set GOROOT, please ask them to update their instructions. Thanks.

    Ian


    On Wednesday, August 26, 2015 at 9:44:24 AM UTC-4, User123 wrote:

    I wanted to update Golang

    But sudo apt-get install golang was not updating it.

    So I followed these steps:
    https://gist.github.com/PistachioPony/06c3ca4a3310b8f46596
    Go the link from this post:
    https://groups.google.com/forum/#!searchin/golang-nuts/debian|sort:relevance/golang-nuts/7G72OlUKMeI/ByKX4MYZ7tkJ

    It worked.
    But now I am unable to run my project.

    It gives 'cannot find package error'
    http.go:4:2: cannot find package "fmt" in any of:
    /usr/lib/go/src/fmt (from $GOROOT)
    /home/devUser/go-projects/src/fmt (from $GOPATH)

    go env is:
    GOARCH="amd64"
    GOBIN="/usr/bin/go"
    GOCHAR="6"
    GOEXE=""
    GOHOSTARCH="amd64"
    GOHOSTOS="linux"
    GOOS="linux"
    GOPATH="/home/devUser/go-projects"
    GORACE=""
    GOROOT="/usr/lib/go"
    GOTOOLDIR="/usr/lib/go/pkg/tool/linux_amd64"
    CC="gcc"
    GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0"
    CXX="g++"
    CGO_ENABLED="1"

    Can someone please help
    --
    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/d/optout.
    --
    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/d/optout.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedAug 26, '15 at 1:44p
activeAug 26, '15 at 4:55p
posts3
users3
websitegolang.org

People

Translate

site design / logo © 2021 Grokbase