Ask Your Question
0

Can't get golang working on Fedora 19

asked 2013-10-25 06:46:08 -0500

m0nhawk gravatar image

updated 2014-04-11 16:21:45 -0500

remjg gravatar image

I've installed the golang package on Fedora 19.

Go also needs the the GOPATH variable. I added to my ~/.bashrc:

GOPATH=$HOME/.go/

But go env didn't see it (after the source ~/.bashrc):

GOARCH="386"
GOBIN=""
GOCHAR="8"
GOEXE=""
GOHOSTARCH="386"
GOHOSTOS="linux"
GOOS="linux"
GOPATH=""
GORACE=""
GOROOT="/usr/lib/golang"
GOTOOLDIR="/usr/lib/golang/pkg/tool/linux_386"
CC="gcc"
GOGCCFLAGS="-g -O2 -fPIC -m32 -pthread"
CGO_ENABLED="1"

Why it didn't see my GOPATH?

PS: echo $GOPATH:

/home/m0nhawk/.go/
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2013-10-25 08:43:47 -0500

maarten gravatar image

updated 2013-10-25 08:54:07 -0500

export GOPATH=$HOME/.go

Read the http://golang.org/doc/code.html (Go documentation)

edit flag offensive delete link more
0

answered 2013-10-26 02:33:47 -0500

yanglifu90 gravatar image

I didn't set any path environment and go works fine.

It successfully pass the hello world test

Here is the output of go env:

GOARCH="amd64"
GOBIN=""
GOCHAR="6"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH=""
GORACE=""
GOROOT="/usr/lib64/golang"
GOTOOLDIR="/usr/lib64/golang/pkg/tool/linux_amd64"
CC="gcc"
GOGCCFLAGS="-g -O2 -fPIC -m64 -pthread"
CGO_ENABLED="1"

And it did not add anything to .bashrc

go version:

go version go1.1.2 linux/amd64
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2013-10-25 06:46:08 -0500

Seen: 1,860 times

Last updated: Oct 26 '13