How To Install golang on Rocky Linux 8

In this tutorial we learn how to install golang on Rocky Linux 8. golang is The Go Programming Language

Introduction

In this tutorial we learn how to install golang on Rocky Linux 8.

What is golang

The Go Programming Language.

We can use yum or dnf to install golang on Rocky Linux 8. In this tutorial we discuss both methods but you only need to choose one of method to install golang.

Install golang on Rocky Linux 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

After updating yum database, We can install golang using dnf by running the following command:

sudo dnf -y install golang

Install golang on Rocky Linux 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install golang using yum by running the following command:

sudo yum -y install golang

How To Uninstall golang on Rocky Linux 8

To uninstall only the golang package we can use the following command:

sudo dnf remove golang

golang Package Contents on Rocky Linux 8

/etc/gdbinit.d
/etc/gdbinit.d/golang.gdb
/etc/prelink.conf.d
/etc/prelink.conf.d/golang.conf
/usr/lib/.build-id
/usr/lib/.build-id/31
/usr/lib/.build-id/31/3ecf37fc77f4e0d5780576dd6077168f991200
/usr/lib/.build-id/3c
/usr/lib/.build-id/3c/bafbed5802dff5c21b34efcb0c6eb249a408ac
/usr/lib/.build-id/88
/usr/lib/.build-id/88/b13b6a12e6bee4728c995220534533484cba77
/usr/lib/.build-id/89
/usr/lib/.build-id/89/4a769804d7204c0ca305d31e75ee18eb24d958
/usr/lib/.build-id/be
/usr/lib/.build-id/be/ee87b323b7a49d1df65e6297163925694f4620
/usr/lib/.build-id/d0
/usr/lib/.build-id/d0/62e763cd4eb3de7bea08a471175f0a4ac9976c
/usr/lib/golang
/usr/lib/golang/VERSION
/usr/lib/golang/api
/usr/lib/golang/api/README
/usr/lib/golang/api/except.txt
/usr/lib/golang/api/go1.1.txt
/usr/lib/golang/api/go1.10.txt
/usr/lib/golang/api/go1.11.txt
/usr/lib/golang/api/go1.12.txt
/usr/lib/golang/api/go1.13.txt
/usr/lib/golang/api/go1.14.txt
/usr/lib/golang/api/go1.15.txt
/usr/lib/golang/api/go1.2.txt
/usr/lib/golang/api/go1.3.txt
/usr/lib/golang/api/go1.4.txt
/usr/lib/golang/api/go1.5.txt
/usr/lib/golang/api/go1.6.txt
/usr/lib/golang/api/go1.7.txt
/usr/lib/golang/api/go1.8.txt
/usr/lib/golang/api/go1.9.txt
/usr/lib/golang/api/go1.txt
/usr/lib/golang/api/next.txt
/usr/lib/golang/favicon.ico
/usr/lib/golang/lib
/usr/lib/golang/lib/time
/usr/lib/golang/lib/time/README
/usr/lib/golang/lib/time/update.bash
/usr/lib/golang/lib/time/zoneinfo.zip
/usr/lib/golang/robots.txt
/usr/share/doc/golang
/usr/share/doc/golang/AUTHORS
/usr/share/doc/golang/CONTRIBUTORS
/usr/share/doc/golang/LICENSE
/usr/share/doc/golang/PATENTS
/usr/share/gocode
/usr/share/gocode/src
/usr/share/gocode/src/bitbucket.org
/usr/share/gocode/src/code.google.com
/usr/share/gocode/src/code.google.com/p
/usr/share/gocode/src/github.com
/usr/share/gocode/src/golang.org
/usr/share/gocode/src/golang.org/x

References

Summary

In this tutorial we learn how to install golang on Rocky Linux 8 using yum and dnf.