Install Google’s Go programming language using a proxy

Installing the Go Programming Language is pretty easy, but can be a pain when done behind a firewall and there isn’t one page with all the information necessary. So, here is the one page.

For step: “$ sudo easy_install mercurial”

“mercurial” is probably already in your favorite distro, it is for debian at least. So instead of using the easy_install script, try your distro’s package management app. For debian, apt-get install mercurial did the trick.  If you insist on doing it manually, you might need a proxy statement in your env like:

export http_proxy=”http://user:pass@myproxy.example.com:1234/”

For step: “hg clone -r release https://go.googlecode.com/hg/ $GOROOT”

You should probably have an .hgrc file with proxy information in it, including the user name and password for the proxy (be sure to take the credentials out again after install, and only put em in when using hg again)

———– .hgrc with just the minimum necessary contents —————-
[http_proxy]
# Used to access web-based Mercurial repositories through a HTTP proxy.

host=myproxy:1234

passwd=mysecretpassword

user=myuser
——————————————————-

For step: “$ ./all.bash”

At the moment there are tests ran during the build, requiring network connectivity. There is discussion on the go-nuts mailing list about fixing it,  but until then removing “http” and “net” from tests in the make file:

$GOROOT/src/pkg/Makefile

will get you “Go”-ing again.

To do this, search for NOTEST and add entries “http\” and “net\” to the end, using tabs for the indentation. The complete list should look like the following when complete:
NOTEST=\
debug/proc\
exp/draw\
go/ast\
go/doc\
go/token\
hash\
image\
image/jpeg\
malloc\
rand\
runtime\
syscall\
testing/iotest\
xgb\
http\
net\

About these ads

About Jayson
Father, mountain biker, Software developer at a wire service, and also work with the IPTC (iptc.org)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: