How To Install golang on Fedora 34
Introduction
In this tutorial we learn how to install golang
on Fedora 34.
What is golang
The Go Programming Language.
We can use yum
or dnf
to install golang
on Fedora 34. In this tutorial we discuss both methods but you only need to choose one of method to install golang.
Install golang on Fedora 34 Using dnf
Update yum database with dnf
using the following command.
sudo dnf makecache --refresh
The output should look something like this:
Fedora 34 - x86_64 20 kB/s | 6.6 kB 00:00
Fedora 34 openh264 (From Cisco) - x86_64 1.4 kB/s | 989 B 00:00
Fedora Modular 34 - x86_64 68 kB/s | 6.5 kB 00:00
Fedora 34 - x86_64 - Updates 3.5 kB/s | 6.2 kB 00:01
Fedora Modular 34 - x86_64 - Updates 17 kB/s | 5.9 kB 00:00
Metadata cache created.
After updating yum database, We can install golang
using dnf
by running the following command:
sudo dnf -y install golang
Install golang on Fedora 34 Using yum
Update yum database with yum
using the following command.
sudo yum makecache --refresh
The output should look something like this:
Fedora 34 - x86_64 20 kB/s | 6.6 kB 00:00
Fedora 34 openh264 (From Cisco) - x86_64 1.4 kB/s | 989 B 00:00
Fedora Modular 34 - x86_64 68 kB/s | 6.5 kB 00:00
Fedora 34 - x86_64 - Updates 3.5 kB/s | 6.2 kB 00:01
Fedora Modular 34 - x86_64 - Updates 17 kB/s | 5.9 kB 00:00
Metadata cache created.
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 Fedora 34
To uninstall only the golang
package we can use the following command:
sudo dnf remove golang
golang Package Contents on Fedora 34
/etc/gdbinit.d
/etc/gdbinit.d/golang.gdb
/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.16.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/doc
/usr/lib/golang/favicon.ico
/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/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
/usr/share/licenses/golang
/usr/share/licenses/golang/LICENSE
/usr/share/licenses/golang/PATENTS
References
Summary
In this tutorial we learn how to install golang
on Fedora 34 using yum and dnf.