Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free.

I have installed google go on my server using the golang repo for CentOS 6.4. The paths are set correctly and I can run go version. When I try to download the package below I receive this error. Any help is appreciated

go get github.com/fiorix/freegeoip
# github.com/fiorix/freegeoip
cannot create <nil>/go.o: No such file or directory
share|improve this question
    
you probably don't have $GOPATH set correctly. can you paste the output of go env please? Also, can you go get other packages? –  Not_a_Golfer Mar 3 '14 at 21:22
    
here is the output of go env go env GOARCH="amd64" GOBIN="" GOCHAR="6" GOEXE="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOOS="linux" GOPATH="/home/www/geocode" GORACE="" GOROOT="/usr/lib64/golang" GOTOOLDIR="/usr/lib64/golang/pkg/tool/linux_amd64" TERM="dumb" CC="gcc" GOGCCFLAGS="-g -O2 -fPIC -m64 -pthread" CXX="g++" CGO_ENABLED="1" –  jnbankston Mar 3 '14 at 21:24
    
Clone the repo yourself and see if this problem is git related. –  Volker Mar 3 '14 at 21:29
    
does /home/www/geocode exist? does the user who does the go get have access to it? I just installed it here and it works fine. –  Not_a_Golfer Mar 3 '14 at 21:30
1  
from a bit of reading, it sounds like a missing TMPDIR in your env. try something like export TMPDIR=/tmp and see if it helps. –  Not_a_Golfer Mar 3 '14 at 22:02

1 Answer 1

up vote 5 down vote accepted

googling that error I came across a thread that suggests that this is a bug with detecting a missing TMPDIR environment variable, for compiling the source during go get.

run export TMPDIR=/tmp and it should work.

See here: https://groups.google.com/forum/#!topic/golang-dev/LnxmgwB0r3Q

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.