How To Install go-rpm-macros.x86_64 on Amazon Linux 2

In this tutorial we learn how to install go-rpm-macros.x86_64 in Amazon Linux 2. go-rpm-macros.x86_64 is Build-stage rpm automation for Go packages

Introduction

In this tutorial we learn how to install go-rpm-macros.x86_64 on Amazon Linux 2.

What is go-rpm-macros.x86_64

This package provides build-stage rpm automation to simplify the creation of Go language (golang) packages. It does not need to be included in the default build root go-srpm-macros will pull it in for Go packages only.

We can use yum to install go-rpm-macros.x86_64 on Amazon Linux 2. In this tutorial we discuss both methods but you only need to choose one of method to install go-rpm-macros.x86_64.

Install go-rpm-macros.x86_64 on Amazon Linux 2 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install go-rpm-macros.x86_64 using yum by running the following command:

sudo yum -y install go-rpm-macros.x86_64

How To Uninstall go-rpm-macros.x86_64 on Amazon Linux 2

To uninstall only the go-rpm-macros.x86_64 package we can use the following command:

sudo yum remove go-rpm-macros.x86_64

go-rpm-macros.x86_64 Package Contents on Amazon Linux 2

/usr/bin/go-rpm-integration
/usr/lib/rpm/fileattrs/go.attr
/usr/lib/rpm/fileattrs/gobundled.attr
/usr/lib/rpm/fileattrs/gosymlink.attr
/usr/lib/rpm/gobundled.prov
/usr/lib/rpm/gosymlink.deps
/usr/lib/rpm/lua/fedora/rpm/go.lua
/usr/lib/rpm/macros.d/macros.go-compiler-golang
/usr/lib/rpm/macros.d/macros.go-compilers-gcc
/usr/lib/rpm/macros.d/macros.go-compilers-golang
/usr/lib/rpm/macros.d/macros.go-compilers-golang-nopie
/usr/lib/rpm/macros.d/macros.go-compilers-golang-pie
/usr/lib/rpm/macros.d/macros.go-rpm
/usr/lib/rpm/macros.d/macros.go-rpm.deprecated
/usr/lib/rpm/macros.d/macros.go-rpm.internal
/usr/share/doc/go-rpm-macros
/usr/share/doc/go-rpm-macros/README.md
/usr/share/licenses/go-rpm-macros
/usr/share/licenses/go-rpm-macros/LICENSE.txt

References

Summary

In this tutorial we learn how to install go-rpm-macros.x86_64 on Amazon Linux 2 using yum.