[b]安装Mercurial[/b]
如何在Ubuntu上安装Mercurial?
[code]
sudo apt-get install python2.5
sudo apt-get install python-all-dev
sudo apt-get install python-setuptools
sudo easy_install -U mercurial
hg --version
[/code]
[b]安装GO[/b]
[code]
hg clone -u release https://code.google.com/p/go ~/dist
cd go/src
./all.bash
[/code]
运行all.bash后,出现“ALL TESTS PASSED” 说明安装成功
在~/.bashrc文件中增加以下
[code]
export GOROOT=~/dist
export GOBIN=$GOROOT/bin
export PATH=$PATH:$GOBIN
[/code]
测试是否可以用命令中运行 #go
[code]
Go is a tool for managing Go source code.
Usage:
go command [arguments]
The commands are:
build compile packages and dependencies
clean remove object files
env print Go environment information
fix run go tool fix on packages
fmt run gofmt on package sources
get download and install packages and dependencies
install compile and install packages and dependencies
list list packages
run compile and run Go program
test test packages
tool run specified go tool
version print Go version
vet run go tool vet on packages
Use "go help [command]" for more information about a command.
Additional help topics:
c calling between Go and C
gopath GOPATH environment variable
importpath import path syntax
packages description of package lists
testflag description of testing flags
testfunc description of testing functions
Use "go help [topic]" for more information about that topic.
[/code]
[b]官方有一种更简单的方式安装[/b]
1.下载go源代码
[code]
wget http://go.googlecode.com/files/go1.2.linux-amd64.tar.gz
[/code]
2.解压到/usr/local 目录下
[code]
tar -C /usr/local -xzf go1.2.linux-amd64.tar.gz
[/code]
3.增加到PATH中
在/etc/profile或者 $HOME/.profile中增加
[code]
export PATH=$PATH:/usr/local/go/bin
[/code]
4.运行go测试是否成功
参考:[url=http://blog.csdn.net/tony1130/article/details/3739695]http://blog.csdn.net/tony1130/article/details/3739695[/url]
如何在Ubuntu上安装Mercurial?
[code]
sudo apt-get install python2.5
sudo apt-get install python-all-dev
sudo apt-get install python-setuptools
sudo easy_install -U mercurial
hg --version
[/code]
[b]安装GO[/b]
[code]
hg clone -u release https://code.google.com/p/go ~/dist
cd go/src
./all.bash
[/code]
运行all.bash后,出现“ALL TESTS PASSED” 说明安装成功
在~/.bashrc文件中增加以下
[code]
export GOROOT=~/dist
export GOBIN=$GOROOT/bin
export PATH=$PATH:$GOBIN
[/code]
测试是否可以用命令中运行 #go
[code]
Go is a tool for managing Go source code.
Usage:
go command [arguments]
The commands are:
build compile packages and dependencies
clean remove object files
env print Go environment information
fix run go tool fix on packages
fmt run gofmt on package sources
get download and install packages and dependencies
install compile and install packages and dependencies
list list packages
run compile and run Go program
test test packages
tool run specified go tool
version print Go version
vet run go tool vet on packages
Use "go help [command]" for more information about a command.
Additional help topics:
c calling between Go and C
gopath GOPATH environment variable
importpath import path syntax
packages description of package lists
testflag description of testing flags
testfunc description of testing functions
Use "go help [topic]" for more information about that topic.
[/code]
[b]官方有一种更简单的方式安装[/b]
1.下载go源代码
[code]
wget http://go.googlecode.com/files/go1.2.linux-amd64.tar.gz
[/code]
2.解压到/usr/local 目录下
[code]
tar -C /usr/local -xzf go1.2.linux-amd64.tar.gz
[/code]
3.增加到PATH中
在/etc/profile或者 $HOME/.profile中增加
[code]
export PATH=$PATH:/usr/local/go/bin
[/code]
4.运行go测试是否成功
参考:[url=http://blog.csdn.net/tony1130/article/details/3739695]http://blog.csdn.net/tony1130/article/details/3739695[/url]