Go language, in Ubuntu9.10 and Windows installation

Source: Internet
Author: User
Tags install go mercurial
This is a creation in Article, where the information may have evolved or changed. Working environment: UBUNTU9.10A, installing C language Tools The tools chain of Go is written in C and the following development tools are required to build: Gcc C Language standard library, The parser generator Bison, Make awk, and Ed (editor). For OS X Systems, the above tools are part of Xcode.
For the Ubuntu/debian system, run the Install command:
sudo apt-get install bison ed gawk gcc Libc6-dev makeb, installation mercurial You need to install the mercurial version management system before doing the following operations (you can output HG noun detection for installation). Enter the following command to install:
sudo easy_install mercurial For Ubuntu/debian Systems, the Easy_install command can be used
Apt-get Install Python-setuptools Python-dev build-essential Installation. If the above command fails to install, you can also try to download the official website. C, get the code The following command creates a go directory. Switch to the appropriate directory and make sure the Go directory does not exist at the current location, run the command:
$ HG clone-r release Https://go.googlecode.com/hg/goD, install go To compile the GO environment:
$ CD GO/SRC $./all.bash after the compilation is complete, the following information is printed at the end.
---CD. /test
---installed Go for linux/i386 In/home/fuhao/go. Installed commands in/home/you/go/bin.*** you need to Add/home/you/go/bin to your $PATH. The compiler is 8g. where n differs for different versions, indicating the number of failed tests.
E, update go $ CD GO/SRC $ HG Pull $ HG Update release $./ALL.BASHF, setting environment variables Edit/HOME/FUHAO/.BASHRC File # Set Go Environment Export goroot= $HOME/go Export goarch=386 Export Goos=linux Export gobin= $GOROOT/bin Export path= $PATH: $GOBIN Verify that the setting is successful: 8g-v
---successWindow development environment: There are two versions of the http://code.google.com/p/gomingw/downloads/list download. EXE and zip Green edition download install or unzip. Set the environment variable goarch=386gobin= D:\program\go\bin (you go to install directory) Goos=windowsgoroot=d:\program\gopath add:;%gobin% then enter 8g under DOS- V test is safe and successful.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.