installgo
Install a pinned Go release on the RHEL family from the official tarball — on Debian and Ubuntu, this only repairs a broken
dpkgstate and does not install Go
- Command:
/go/installgo - Category: Install
- Required option: None
- Output: A progress indicator, then whatever
dnf,wget, andtarprint - Last updated: 2026-11-20
On this page: Overview · Quick start · Syntax · Options · Output · Examples · Troubleshooting · Details · See also
Overview
/go/installgo is meant to install the Go programming language. What it actually does differs sharply by OS:
[!WARNING] On Debian and Ubuntu, this command does not install Go at all. It only runs
dpkg --configure -a, which finishes configuring any pending or half-installed packages — a standard way to repair a brokendpkgstate, unrelated to Go. If you need Go on Debian or Ubuntu, install it yourself (your distribution'sgolang-gopackage, or the official tarball from go.dev/dl).
[!WARNING] On the RHEL family, the existing Go installation at
/usr/lib/golangis deleted before the replacement is downloaded and extracted. If the download fails or is interrupted, the server is left with no working Go install there at all. See Known issues.
On the RHEL family (AlmaLinux, Rocky Linux, CentOS, Red Hat, Fedora) it:
- reinstalls the distribution's
gopackage - downloads a specific, hardcoded Go release from
go.devand unpacks it into/usr/lib/golang, overwriting whatever was there
The call is appended to /var/log/go/installgo.log.
Quick start
# RHEL family
/go/installgo
go version
# Debian or Ubuntu — this does NOT install Go; install it yourself
sudo apt install golang-go
Syntax
/go/installgo
The command takes no arguments. There is no way to choose a Go version; it's hardcoded in the script.
Options
None.
Output
A progress indicator ("Installing Go Programming Language"), then the output of dnf, wget, and tar on the RHEL family, or the output of dpkg --configure -a on Debian and Ubuntu. There is no final confirmation message or version check.
Examples
# RHEL family: install/refresh Go, then confirm the version
/go/installgo
go version
# Check where the go binary on PATH actually points
which go
Troubleshooting
| Symptom | Likely cause | Fix |
|---|---|---|
go version shows no change, or an older version, on Debian or Ubuntu |
Expected: this command doesn't install Go on these systems at all. | Install Go yourself; see the warning above. |
go version still shows the distro-packaged version on the RHEL family |
The distro's go package may place its binary at /usr/bin/go, separate from /usr/lib/golang, and nothing in this script updates PATH or a symlink to prefer the newly extracted copy. |
Run which go to see which binary is actually first on PATH, and point it at /usr/lib/golang/bin/go if needed. |
| No Go install at all after running it on the RHEL family | The download from go.dev failed or was interrupted after the existing install was already deleted. |
Check network access to go.dev, then run the command again, or download and extract the tarball manually. |
| The file-copy step appears to do nothing, or you see permission errors | The final copy into /usr/lib/golang is not run with sudo, unlike every other step in the script; if the command isn't already running fully as root, this step can silently fail against a root-owned directory. |
Run the whole command as root (sudo /go/installgo), not as a user that merely has sudo for individual commands. |
rpm -V go (or similar package verification) reports modified or missing files |
The distro's go package is reinstalled and then its files under /usr/lib/golang are overwritten outside the package manager by the tarball extraction. |
Expected side effect of this script; the RPM database no longer matches what's on disk for this package. |
Details
RHEL family steps
- Removes and reinstalls the distribution's
gopackage. - Deletes everything under
/usr/lib/golang. - Downloads a fixed release — currently
go1.24.2forlinux-amd64— fromhttps://go.dev/dl/, with no checksum or signature check. - Extracts it and copies the result into
/usr/lib/golangwithcf(withoutsudo, unlike the rest of the script). - Removes the temporary working folder.
Debian and Ubuntu steps
Runs dpkg --configure -a only. This does not install, upgrade, or touch Go in any way.
Known issues
- Debian and Ubuntu install nothing. The branches for both operating systems only repair
dpkg's state; neither callsapt installfor any Go package. The command's purpose does not apply to these systems as currently written. - Delete-before-download.
/usr/lib/golangis wiped before the new tarball is confirmed to have downloaded and extracted successfully. A failed or interrupted download leaves no working Go install in that location. - The version is hardcoded.
go1.24.2is written directly into the script, with no way to request a different version and no mechanism to keep it current as new Go releases ship. Each new Go version requires editing this script. - No checksum or signature verification on the downloaded tarball, unlike the checksums
go.dev/dlpublishes for each release. - The copy step is missing
sudo, inconsistent with every other line in the script. If the script ever runs without already being fully elevated, this is the one step that can quietly fail. - Reinstalling the distro package, then overwriting its files by hand, desyncs the package manager's records from what's actually on disk — future package verification or upgrades of
gomay not behave as expected. - No confirmation that the new version is actually in use. Depending on how the distro's
gopackage andPATHare set up,/usr/bin/gomay still point to the older, package-managed binary rather than the one just extracted to/usr/lib/golang.
See also
| Command | Description |
|---|---|
cf |
Copy all files from a source folder to a destination folder |
nodejs |
Install the latest Node.js version on a GoAdmio server |
composer |
Install Composer (PHP dependency manager) |
docker |
Install Docker CE, containerd, and Docker Compose on RHEL-family servers |
package |
Install all base packages required by GoAdmio |