Go lang (Debian Lenny) インストール

Go Debian Lenny
概略だけの手抜き。この通りにやってもおそらくインストールできないので、正式ページ http://golang.org/doc/install.html を参考にすること。

.bashrc に以下の環境変数を追記

export GOROOT=$HOME/go
export GOARCH=386
export GOOS=linux
export GOBIN=$HOME/bin
export PATH=$GOBIN:$PATH
source .bashrc    
apt-get install python-setuptools python-dev
sudo easy_install mercurial
hg clone -r release https://go.googlecode.com/hg/ $GOROOT
sudo apt-get install bison gcc libc6-dev ed make
cd $GOROOT/src
./all.bash

インストール成功すると、次のように表示される

--- cd ../test
N known bugs; 0 unexpected bugs

ソースを書く
コンパイル

8g file.go

リンク

8l file.8

実行

./8.out