Table of Contents
Introduction
This is a companion to https://go.dev/doc/install/source providing additional instructions for various operating systems.
Install C tools
On OS X, a C compiler is bundled in the command line tools for
Xcode,
and you don't need to install the whole Xcode to compile Go.
If you have already installed Xcode 4.3+, you can install command
line tools from the Components tab of the Downloads preferences panel.
In more recent versions of Xcode, you can use xcode-select --install
command to install the command line tools without opening Xcode.
To verify you have a working compiler, just invoke gcc
in a freshly created Terminal window, unless you see the
"gcc: command not found" error, you are ready to go.
On Ubuntu/Debian, use sudo apt-get install gcc libc6-dev.
If you want to build 32-bit binaries on a 64-bit system you'll also need the libc6-dev-i386 package.
On RedHat/Centos 6, use sudo yum install gcc glibc-devel.
If you want to build 32-bit binaries on a 64-bit system you'll need both
glibc-devel.i386 and glibc-devel.x86_64 packages.
On Windows, install gcc with
TDM-GCC. or try TDM-GCC Sourceforge link.
(Make sure you add its bin subdirectory to your PATH.) Go does not support the Cygwin toolchain.
AVX512 Articles AssemblyPolicy Benchmarks Blogs Books BoundingResourceUse CSSStyleGuide ChromeOS CodeReview CodeReviewComments CodeReviewConcurrency CodeTools Comments CommitMessage CommonMistakes CompilerOptimizations Conferences Configuring GoLand for WebAssembly Contributing to gopls CoreDumpDebugging Courses CreatingSubRepository CustomPprofProfiles Darwin DashboardBuilders Deprecated DesignDocuments Diagnostics Download build farm failed logs and debugging DragonFly BSD ErrorValueFAQ Errors ExperienceReports FileTreeDocumentation FreeBSD FromXToGo Frozen Fuzzing trophy case GOPATH Gardening GcToolchainTricks GccgoCrossCompilation GerritAccess GerritBot GithubAccess Go 1.10 Release Party Go 1.6 release party Go 1.8 Release Party Go Community Slides Go Release Cycle Go2 Go2ErrorHandlingFeedback Go2ErrorValuesFeedback Go2GenericsFeedback GoArm GoForCPPProgrammers GoGenerateTools GoGetProxyConfig GoGetTools GoMips GoStrings GoTalks GoUserGroups GoUsers Gomote Gopher HandlingIssues Home HostedContinuousIntegration How to ask for help HowToAsk IDEsAndTextEditorPlugins InstallFromSource InstallTroubleshooting InterfaceSlice InvalidFlag Iota Learn LearnConcurrency LearnErrorHandling LearnServerProgramming LearnTesting Linux LinuxKernelSignalVectorBug Livestreams LockOSThread MacOS12BSDThreadRegisterIssue MethodSets MinimumRequirements MinorReleases Mobile Modules MutexOrChannel NativeClient NetBSD NewSpeakers NoMeToo NoPlusOne NonEnglish OpenBSD PackagePublishing PanicAndRecover PerfDashboard Performance Plan9 Podcasts PortingPolicy PriorDiscussion Projects Proposals ProviderIntegration Questions Quiet Weeks Range RateLimiting ResearchPapers Resolving Problems From Modified Module Path Resources for slog SQLDrivers SQLInterface Screencasts SettingGOPATH SignalHandling SimultaneousAssignment SliceTricks SlowBots Solaris Spectre Spelling Style SuccessStories Switch TableDrivenTests TargetSpecific TestComments TestFailures Timeouts Training Ubuntu Watchflakes WebAccessibilityResourcesAndTips Well known struct tags WhyGo Windows WindowsBuild WindowsCrossCompiling WindowsDLLs X Repositories _Footer cgo golang tools gopherbot gopls integrator FAQ gopls heapdump13 heapdump14 heapdump15 through heapdump17 heapdump15