GoAdmio

installgo

Install a pinned Go release on the RHEL family from the official tarball — on Debian and Ubuntu, this only repairs a broken dpkg state and does not install Go

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 broken dpkg state, unrelated to Go. If you need Go on Debian or Ubuntu, install it yourself (your distribution's golang-go package, or the official tarball from go.dev/dl).

[!WARNING] On the RHEL family, the existing Go installation at /usr/lib/golang is 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:

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

  1. Removes and reinstalls the distribution's go package.
  2. Deletes everything under /usr/lib/golang.
  3. Downloads a fixed release — currently go1.24.2 for linux-amd64 — from https://go.dev/dl/, with no checksum or signature check.
  4. Extracts it and copies the result into /usr/lib/golang with cf (without sudo, unlike the rest of the script).
  5. 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


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