blob: 9385c662a889cc204ceb55b575087fc044c0af3c [file] [log] [blame] [view]
Andrew Gerrand5bc444d2014-12-10 11:35:11 +11001# Introduction
2
3This is a companion to http://golang.org/doc/install/source providing additional instructions for various operating systems.
4
5## Install C tools
6
7On OS X, a C compiler is bundled in the command line tools for
8[Xcode](http://developer.apple.com/Xcode/),
9and you don't need to install the whole Xcode to compile Go.
10If you have already installed Xcode 4.3+, you can install command
11line tools from the Components tab of the Downloads preferences panel.
12In more recent versions of Xcode, you can use ` xcode-select --install `
13command to install the command line tools without opening Xcode.
14To verify you have a working compiler, just invoke ` gcc `
15in a freshly created Terminal window, unless you see the
16` "gcc: command not found" ` error, you are ready to go.
17
18On Ubuntu/Debian, use ` sudo apt-get install gcc libc6-dev `.
19If you want to build 32-bit binaries on a 64-bit system you'll also need the ` libc6-dev-i386 ` package.
20
21On RedHat/Centos 6, use ` sudo yum install gcc glibc-devel `.
22If you want to build 32-bit binaries on a 64-bit system you'll need both
23` glibc-devel.i386 ` and ` glibc-devel.x86_64 ` packages.
24
25On Windows, install ` gcc ` with
peterGo92b0c502015-03-12 19:49:33 -040026[TDM-GCC](http://tdm-gcc.tdragon.net/).
Gianluca Casatib5427682015-07-21 22:24:21 +020027(Make sure you add its ` bin ` subdirectory to your ` PATH `.) Go does not support the Cygwin toolchain.