Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more

To build Go from source on a Linux VPS, install Git and a compatible bootstrap Go compiler, clone the official Go repository into a clean directory, check out a release tag, then run cd src followed by ./make.bash. Add the checkout’s bin directory to PATH and run a small Go program to verify that the new toolchain works. A C compiler is needed only when you require cgo; a no-cgo build can use CGO_ENABLED=0.

Source builds are valuable for pinned or modified toolchains, Go development, and operating-system/architecture combinations without a suitable binary package. For an ordinary installation, a precompiled archive is simpler.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Decide whether a source build is appropriate

Building the Go distribution is more involved than extracting a release archive because the toolchain is written in Go and therefore needs an existing Go compiler to bootstrap itself. On a VPS, that extra work is justified when you need a reproducible checkout, a patched toolchain, a development branch, or a target for which no precompiled distribution is available.

Situation Best installation method Reason
Routine server installation on a supported platform Precompiled binary archive The official download process is shorter and avoids bootstrap setup.
Pinned release or internally patched compiler Build from source You control the exact tag or commit and can preserve the source tree used.
Go compiler development Build from source on master The development branch is available directly in the repository.
No binary package for the required OS/architecture Build from source The repository provides source-install instructions for unsupported binary combinations.

Do not treat a source build as a replacement for package management on every VPS. If a maintained binary package meets your version and architecture requirements, it normally has lower operational risk. Choose source when control over the toolchain is itself the requirement.

#1 Best Overall
Sale
Compressed Air Duster,130000RPM Super Power Cordless Air Duster,Rechargeable Brushless Blower,3 Gear Adjustable Blower with LED Light,Dust Remover for Computer/House/Outdoor/Car
  • Powerful Turbo Fan:CAGIWIRU Electric Air Duster have reached speed up to 130000RPM,Can efficient remove dust and debris.With LED light and Three Adjustable Speed to meet with different cleaning tasks.
  • With Attached USB C Fasting Charging cable.Charing 3 hours,Enjoy up to 240 minutes of use on the lowest setting, For third speed can use for 25mins.with four charging options to meet with your needs.
  • Wide Application:Upgraded attached 5 different nozzles,making it suitable for a variety of scenes, such as car,pet, pc, keyboards, and other electronic devices. It also serves for office and home clean duster.
  • Handy Design & Portable:Cordless air duster electric nozzle is Light weight and small size, design and comfortable to hold and space saving, convenient to carry around. You can put it in your room or inside the car without taking up space.
  • Warranty & Support: Our Electric air duster comes with 5 years warranty and 24/7 customer service. During this period, if you have any questions,pls kindly feel free to contact us.

Prerequisites on the VPS

Git

Install Git using the package manager for the VPS distribution before fetching the source. The repository is available at https://go.googlesource.com/go. Keep the source tree in a directory you control and record the commit or tag used for the build.

A compatible bootstrap Go compiler

The build scripts search for go in PATH. If the bootstrap compiler is installed elsewhere, set GOROOT_BOOTSTRAP; the scripts then use $GOROOT_BOOTSTRAP/bin/go. The bootstrap compiler must meet the minimum documented version for the release you are building.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Target Go release Minimum bootstrap compiler
Go 1.5 through 1.19 Go 1.4
Go 1.20 through 1.21 Go 1.17
Go 1.22 through 1.23 Go 1.20
Future Go 1.N releases Go 1.M, where M is N−2 rounded down to an even number
Example: Go 1.24 or 1.25 Go 1.22

Use the row that matches the release tag you intend to build, not the newest bootstrap compiler you happen to have. A mismatch usually appears early in the build and is easier to avoid than to diagnose after a long compile.

C compiler for cgo

Install a C compiler such as GCC or Clang if programs built with the resulting toolchain must support cgo. cgo lets Go code call C libraries and is commonly needed by packages that wrap native system APIs. The source build itself can be completed without cgo: set CGO_ENABLED=0 before invoking the build script. A no-cgo toolchain is appropriate when you deliberately want statically oriented, C-free builds and do not need C bindings.

Filesystem and account preparation

  • Choose an installation directory with enough space for the checkout, build artifacts, and tests.
  • Ensure the destination directory named goroot does not already exist before cloning.
  • Use a directory name such as goroot rather than $HOME/go; the latter can be confused with the default GOPATH.
  • Build as a user who can write the checkout. Use elevated privileges only for installing prerequisite packages or moving files into a protected location.
  • On a production VPS, schedule the compile outside peak workload periods, especially when you plan to run the full test suite.

Clone the repository and pin the source

Run the following from the parent directory where you want the source tree. Replace <release-tag> with the exact release tag you have selected.

git clone https://go.googlesource.com/go goroot
cd goroot
git checkout <release-tag>

The Go distribution installs into this checkout and places its executables in the checkout’s bin directory. A release tag or release branch makes the build repeatable; an unpinned checkout can change when you fetch it again.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Tag, branch, or master?

  • Release tag: choose this for a production VPS or any build that must be reproduced later. Record the tag and, preferably, the resolved commit ID.
  • Release branch: use this when you intentionally track maintenance changes on that branch rather than one fixed tag.
  • master: use this for Go development or when you are contributing to the toolchain. Development snapshots can change and should not be treated as a stable production version.

After checkout, confirm the working tree is clean and note the selected revision in your deployment records. Do not silently build whatever branch happened to be checked out by a previous operator.

Rank #2
EVEO® Screen Cleaner Spray Kit (Streak-Free) TV Screen Cleaner for Smart TV, Lcd, LEd, Oled | Computer Screen Cleaner Spray and Wipe Microfiber Cloth - TV, Monitor, Laptop, iPad, Car - 6.7oz 1 Pack
  • Screen Cleaner is Your Screen’s New Bestfriend! - EVEO is proud to present a screen cleaner that’s perfectly suited for your TV. Meet your new screen cleaner, computer screen cleaner, laptop cleaner, iPad cleaner, Macbook,tv cleaner or any other electronic device. Our screen cleaner spray and wipe along with the included plush microfiber cloth, easily removes dust, fingerprints & other smudges on the screen’s surface. Clean effectively for a streak-free screen
  • Gentle on your Screens - Our screen cleaner spray and wipes is compatible to be used even for the most sensitive LCD, LED, CRT, and OLED screens in proper use. Be at ease knowing that this product is compatible with all the major brands: LG, SONY, Samsung, Sharp, iPad, iPhone, Android screens, Kindle, PC monitors - we’ve got you covered! Can be used as LCD screen cleaner, tv cleaner, smart tv screen cleaner, and more
  • Premium Super Soft Plush Microfiber Cloth - Included in this efficient screen cleaning kit. This screen cleaner spray and wipe has our signature plush microfiber cloth specially designed to comply with screens and monitors and leave them streak-free. Has been shown to effectively absorbs stubborn stains, zero streaks, and no fiber shedding. Always use this together with our screen cleaner for the best results
  • Easy-to-Use Screen Cleaner Kit + microfiber cleaning cloth - The EVEO Screen Cleaning Kit will easily be your new favorite tool when it comes to taking care of the things you love most, quick and easy solution for a streak-free screen. Simply screw on the sprayer gun on the screen cleaner bottle. Spray the cleaning liquid onto the microfiber cloth, then wipe the screen until desired cleanliness & shine is achieved.
  • Quality Screen Care Kit Worth Purchasing - Enjoy a convenient Screen Cleaner anytime, anywhere you need it. Your satisfaction is our top priority. We stand behind the quality of our products and that’s why, you shouldn’t be worrying at all. We manufacture the Best Screen Cleaner. and can be used for laptop cleaning kit, laptop screen cleaner, tv screen cleaner for smart tv. MacBook screen cleaner, monitor cleaner or screen cleaner spray for electronic devices with microfiber cleaning cloth

Build the toolchain

Standard build with make.bash

From the repository root, enter src and run the build script:

cd src
./make.bash

The script compiles the distribution and installs the resulting commands into the checkout’s bin directory. A successful run reports the target platform, installation root, command directory, and a reminder about updating PATH. Read that output rather than assuming the installation is under /usr/local/go; a source checkout can live anywhere.

Build and run the longer test suite with all.bash

Use ./all.bash when you want the build followed by the important standard tests:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
cd src
./all.bash

all.bash takes longer than make.bash. It is the better choice before promoting a new compiler to a production fleet or when changing the source, but it consumes more CPU and wall-clock time on a small VPS. A plain make.bash is sufficient for a quick compile when you will run separate validation.

No-cgo build

Disable cgo explicitly when the resulting toolchain and its intended workloads must not use a C compiler or native C libraries:

CGO_ENABLED=0 ./make.bash

The variable must be present on the command that starts the build. If you use the complete build-and-test path, apply it there instead:

CGO_ENABLED=0 ./all.bash

Disabling cgo is a design choice, not a universal optimization. Any software that requires cgo will need a toolchain built and used with cgo enabled and an available C compiler.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
BladeHawks RGB Gaming Mouse Pad Extra Large Extended 31.5x12 Inch-Black
  • 【Large size】:Measuring 800 x 300 mm/ 31. 5×12 inches, which is wider and taller than others. Large mouse pad can perfectly fit your keyboard and mouse of any size, and there is also ample space for peripherals such as phones, tablets, etc.
  • 【LED backlight mouse pad】:Blade Hawks RGB mouse pad provides 7 static modes and 7 dynamic modes will give you the options you are looking for. Power-off memory function remembers the last lighting mode you selected. The super glow fiber Chroma will give you a colorful gaming setup that you want.
  • 【Anti-slip rubber base】:Made from Natural rubber, this gaming mousepad will firmly grip your desktop, allowing you to enjoy the ultimate precision in the games you are most passionate about. It also comes with a texture that enhances this ability even further.
  • 【Smooth and waterproof surface】: Micro-textured cloth surface, for extremely precise mouse control and a smooth movement. When liquid splashes on the gaming mouse pad, it forms water droplets and slides down. Will not delay your work or gameplay.
  • 【Plug and play】: This mouse and keyboard pad is powered by USB, plug and play, no driver required. One button control light modes. Press one time to change the lighting mode, press twice to change the brightness, press and hold about 3 seconds turn ON/OFF.

Put the new Go command on PATH

Immediately after a successful build, you can test the checkout without moving it by adding its bin directory to the current shell:

export PATH="$PWD/../bin:$PATH"
go version

Run that command while your current directory is the checkout’s src directory, or replace the relative path with the absolute path printed by the build. The expected version should correspond to the tag or branch you checked out. If another Go installation appears first in PATH, the shell may execute that older binary instead of the newly built one.

Persisting the path

For a single administrative session, the export is enough. For regular use, add an equivalent export to the profile loaded by the account’s shell, such as the account’s shell startup file, and open a new session. Use the actual checkout path:

export PATH="/your/installation/path/goroot/bin:$PATH"

Do not copy a path from an example blindly. The official build output identifies the command directory for your checkout, and that path is authoritative. Keeping the source tree in place also makes it clear which compiler a process is using.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Verify the compiler with a smoke test

A version string confirms that a command is present, but compiling and executing a program confirms that the newly built toolchain is usable. From a test directory, create hello.go with this content:

package main

import "fmt"

func main() {
    fmt.Printf("hello, worldn")
}

Run it with the go command now on PATH:

go run hello.go

The expected output is:

hello, world

This checks command discovery, compilation, linking, and execution in one small step. If the output is correct, the source-built compiler is functioning for the host platform. It does not by itself prove that every cgo package, cross target, or application-specific dependency will build.

Control targets with GOOS and GOARCH

GOOS and GOARCH describe the operating system and architecture for which the resulting binaries are built. They are target settings, not a statement about the VPS that happens to run the compiler. Set them deliberately and verify that the selected combination is supported.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
Sale
Vaydeer Wrist Rest for Keyboard and Mouse, Computer Ergonomic Wrist Support Pad, Soft Memory Foam Arm Cushion for Desk, Palm Hand Office Laptop Typing
  • 【Softer and More Comfortable】Vaydeer wrist rest has unique diamond pattern, which is the combination of softness and aesthetics. The materials of wrist rest are improved into higher quality memory foam and covered with silky smooth lycra. The computer wrist rest makes you as comfortable and cushiony as like rest your wrists on clouds.
  • 【Ergonomic Wrist Saver】The wrist rests for keyboard and mouse comes with a 17.32×3.15×0.83 inch keyboard wrist pad and a 5.94×3.15×0.83 inch mouse wrist support. Based on ergonomic design, the unique concave shape is the perfect fit for your wrist joints. The wrist rest pad fits most computer keyboards and laptops, improve hand and wrist posture, release your wrist and arm stress.
  • 【Non-Slip Rubber Bottom】Featuring an anti-skid silicone base on the bottom, this wrist keyboard support stays firmly in place on your desk, preventing the padding from sliding around, ensuring stable and consistent wrist support during extended computer sessions.
  • 【Better Experience & Pain Relief】Our keyboard arm rest is beneficial to alleviate the soreness caused by direct contact and friction between your arm and a hard desk surface, reducing the risk of wrist fatigue or carpal tunnel. The soft texture of memory foam can evenly distribute the pressure around your wrists and provide good support with just enough give.
  • 【Helpful in Multiple Scenarios】Whether you're working, studying, writing, typing, gaming, this keyboard and mouse rest combo is an essential accessory to add comfort and support to your hands and wrists. It’s also a great gift for men, women, family, friend, coworker, gamer, teacher, etc.

Linux-capable architectures listed by the Go source instructions include:

  • amd64
  • 386
  • arm64
  • arm
  • loong64
  • mips, mipsle, mips64, and mips64le
  • ppc64 and ppc64le
  • riscv64
  • s390x

Not every operating-system and architecture combination is supported. A 64-bit x86 VPS normally uses GOOS=linux GOARCH=amd64 by default, so you do not need to set those variables for a native build. Set them when producing tools for another machine or when deliberately testing a different target.

Building a bootstrap tree for another target

The official example for creating a bootstrap toolchain for Linux on IBM PowerPC 64 is:

GOOS=linux GOARCH=ppc64 ./bootstrap.bash

The script creates a bootstrap tree for the requested target. Copy that tree to the target machine and point the later source build at it with GOROOT_BOOTSTRAP. This is different from merely setting GOOS and GOARCH for an ordinary program build: bootstrap.bash prepares the compiler needed to build Go itself.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Update an existing source-built Go installation

When a newer tag or maintenance revision is available, update the existing checkout instead of cloning over it. The source instructions use this sequence:

cd go/src
git fetch
git checkout <tag>
./all.bash

Adapt the initial directory to the actual location of your checkout. If the repository directory is named goroot, enter its src directory accordingly. Fetching updates the repository’s references; checking out the desired tag selects the source to compile; all.bash rebuilds and tests it.

Safe replacement on a production VPS

  1. Record the current Go version, source tag or commit, and the absolute path used by running services.
  2. Build the new revision in a separate checkout when you need an easy rollback, or preserve the old checkout until validation is complete.
  3. Run all.bash for the new revision if the maintenance window allows it.
  4. Update the service environment or shell profile to point to the new bin directory.
  5. Run go version and the hello.go smoke test using the same account and environment as the service.
  6. Restart dependent services only after those checks pass.
  7. Keep the previous toolchain until application builds and operational checks succeed; then remove it according to your retention policy.

Keeping the old tree is an operational rollback practice rather than a requirement of the Go scripts. It lets you restore the prior PATH immediately if an application exposes an incompatibility.

Best Value
Sale
Under Desk Cable Management Tray No Drill, Metal Mesh Cable Management Under Desk with Clamp Mount, 2 Hole Cable Tray with Wire Management and Cord Organizer for Home Office Standing Desk
  • 【No Drill Mounted】Cable management tray can be assembled in as little as 3 minutes or less-simply. Side clips easily clampe the edge of desk, pass through the holes on the sides, and secure excess cables with baskets. Desk cable management supports inward or outward installation to meet your needs in different scenarios, and provides you with great convenience when collecting and organizing wires.
  • 【Rubber Pad Protects Desk】Wire organizer under desk built-in soft rubber pads on the clamp protect your desk from scratches, so you will not damage your furniture or office.
  • 【Sturdy and Beautiful】Cord management under desk is made of high-quality carbon steel and holds about 15 lbs. The wire basket has 2 holes on each side of the tray to enable your cables to pass freely. Cable baskets are suitable for desk thickness use from 0.4" to 2.4".
  • 【Space Saving & Keep Organized】Desk cable management tray holds all your power cords, outlet strips, USB hubs and computer transformers hidden from your feet, and the data cables will not enter the vacuum cleaner to keep your desk clean and tidy. Desk wire organizer is also suitable for use in the kitchen and outdoors.
  • 【Reduce Safety Risks】Cable tray under desk keeps all plugs away from your kids, no more worry about tripping. Using 2 holes wire tray saves extra space, helps you easily cabling and wire protection. The mesh design is not easy to accumulate dust, but avoids safety accidents caused by messy wires.

Troubleshoot common failures

“go: command not found” or the wrong Go version

The bootstrap compiler must be discoverable during the build. Check command -v go and go version. If the intended compiler is not the one found, either correct PATH or set GOROOT_BOOTSTRAP to its installation root. After the build, run command -v go again because the shell may still resolve a system installation before the new checkout.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Bootstrap version rejected

Compare the release tag with the bootstrap matrix above. Install or select a compiler in the required range, then rerun the build from the same checkout. Do not infer compatibility solely from the fact that the bootstrap compiler is newer or older; the documented minimum is tied to the target release family.

cgo-related compilation errors

If packages require cgo, install GCC or Clang and build without forcing CGO_ENABLED=0. If you intentionally created a no-cgo toolchain, use packages and application settings that do not require C bindings. A C compiler is optional for the source build but not optional for workloads that actually invoke cgo.

Build appears to install somewhere unexpected

Go source builds install inside the checkout. Read the final lines from make.bash or all.bash for the installation root and command directory, then prepend that exact bin path to PATH. Do not assume the conventional system path used by a precompiled archive.

Cross-target combination fails

Confirm that the selected GOOS/GOARCH pair is supported and that you are distinguishing a normal target build from creation of a bootstrap tree. For a bootstrap tree, use bootstrap.bash with the target variables; for a native source build, leave the variables unset unless you have a specific target requirement.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Tests take too long or fail on a busy VPS

all.bash intentionally performs more work than make.bash. Run it during a maintenance window, monitor CPU and memory pressure, and avoid compiling while latency-sensitive services are saturated. If you only need to produce a compiler for an initial smoke test, use make.bash first and schedule the full test run before production promotion.

Source build or precompiled archive?

The official Go download guidance describes precompiled binaries as the quick, simpler path and advises removing an old /usr/local/go tree before extracting a fresh archive. That advice applies to archive-based installation; it does not mean a source checkout should be moved into that directory. A source build remains the better fit when you need exact source provenance, modifications, development work, or an unsupported binary combination.

Criterion Source build Precompiled archive
Setup effort Requires Git, bootstrap Go, source checkout, and scripts. Download and extract the matching archive.
Version control Exact tag, branch, or commit can be recorded and rebuilt. Version is fixed by the published archive.
Customization Supports patches and development branches. Uses the vendor’s published binaries.
Unsupported platform combinations Often the available route when source supports the target. May not exist for the required combination.
Routine VPS deployment More moving parts to maintain. Usually the simpler operational choice.

Whichever method you choose, keep the selected version explicit in deployment documentation and ensure the service actually invokes that version rather than an older binary left earlier in PATH.

Build checklist

  • Git is installed and the checkout destination does not already exist.
  • The bootstrap Go compiler meets the target release’s documented minimum.
  • GOROOT_BOOTSTRAP is set when the bootstrap compiler is not the one in PATH.
  • GCC or Clang is installed when cgo support is required.
  • The repository is pinned to a release tag, release branch, or intentionally selected master revision.
  • cd src and ./make.bash complete successfully; use ./all.bash for the longer standard test run.
  • The generated bin directory is first in the intended shell or service PATH.
  • go version reports the newly built compiler.
  • go run hello.go prints hello, world.
  • For cross-target work, GOOS and GOARCH are set intentionally and the combination is supported.
  • For production updates, the previous toolchain remains available until the replacement passes application checks.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.