How To Install golang-race on CentOS 8

golang-race is Golang std library with -race enabled

Introduction

In this tutorial we learn how to install golang-race on CentOS 8.

What is golang-race

Golang std library with -race enabled

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

Install golang-race on CentOS 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

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

sudo dnf -y install golang-race

Install golang-race on CentOS 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

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

sudo yum -y install golang-race

How To Uninstall golang-race on CentOS 8

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

sudo dnf remove golang-race

golang-race Package Contents on CentOS 8

/usr/lib/golang/pkg/linux_amd64_race
/usr/lib/golang/pkg/linux_amd64_race/archive
/usr/lib/golang/pkg/linux_amd64_race/archive/tar.a
/usr/lib/golang/pkg/linux_amd64_race/archive/zip.a
/usr/lib/golang/pkg/linux_amd64_race/bufio.a
/usr/lib/golang/pkg/linux_amd64_race/bytes.a
/usr/lib/golang/pkg/linux_amd64_race/compress
/usr/lib/golang/pkg/linux_amd64_race/compress/bzip2.a
/usr/lib/golang/pkg/linux_amd64_race/compress/flate.a
/usr/lib/golang/pkg/linux_amd64_race/compress/gzip.a
/usr/lib/golang/pkg/linux_amd64_race/compress/lzw.a
/usr/lib/golang/pkg/linux_amd64_race/compress/zlib.a
/usr/lib/golang/pkg/linux_amd64_race/container
/usr/lib/golang/pkg/linux_amd64_race/container/heap.a
/usr/lib/golang/pkg/linux_amd64_race/container/list.a
/usr/lib/golang/pkg/linux_amd64_race/container/ring.a
/usr/lib/golang/pkg/linux_amd64_race/context.a
/usr/lib/golang/pkg/linux_amd64_race/crypto
/usr/lib/golang/pkg/linux_amd64_race/crypto.a
/usr/lib/golang/pkg/linux_amd64_race/crypto/aes.a
/usr/lib/golang/pkg/linux_amd64_race/crypto/cipher.a
/usr/lib/golang/pkg/linux_amd64_race/crypto/des.a
/usr/lib/golang/pkg/linux_amd64_race/crypto/dsa.a
/usr/lib/golang/pkg/linux_amd64_race/crypto/ecdsa.a
/usr/lib/golang/pkg/linux_amd64_race/crypto/ed25519
/usr/lib/golang/pkg/linux_amd64_race/crypto/ed25519.a
/usr/lib/golang/pkg/linux_amd64_race/crypto/ed25519/internal
/usr/lib/golang/pkg/linux_amd64_race/crypto/ed25519/internal/edwards25519.a
/usr/lib/golang/pkg/linux_amd64_race/crypto/elliptic.a
/usr/lib/golang/pkg/linux_amd64_race/crypto/hmac.a
/usr/lib/golang/pkg/linux_amd64_race/crypto/internal
/usr/lib/golang/pkg/linux_amd64_race/crypto/internal/boring
/usr/lib/golang/pkg/linux_amd64_race/crypto/internal/boring.a
/usr/lib/golang/pkg/linux_amd64_race/crypto/internal/boring/fipstls.a
/usr/lib/golang/pkg/linux_amd64_race/crypto/internal/boring/sig.a
/usr/lib/golang/pkg/linux_amd64_race/crypto/internal/randutil.a
/usr/lib/golang/pkg/linux_amd64_race/crypto/internal/subtle.a
/usr/lib/golang/pkg/linux_amd64_race/crypto/md5.a
/usr/lib/golang/pkg/linux_amd64_race/crypto/rand.a
/usr/lib/golang/pkg/linux_amd64_race/crypto/rc4.a
/usr/lib/golang/pkg/linux_amd64_race/crypto/rsa.a
/usr/lib/golang/pkg/linux_amd64_race/crypto/sha1.a
/usr/lib/golang/pkg/linux_amd64_race/crypto/sha256.a
/usr/lib/golang/pkg/linux_amd64_race/crypto/sha512.a
/usr/lib/golang/pkg/linux_amd64_race/crypto/subtle.a
/usr/lib/golang/pkg/linux_amd64_race/crypto/tls
/usr/lib/golang/pkg/linux_amd64_race/crypto/tls.a
/usr/lib/golang/pkg/linux_amd64_race/crypto/tls/fipsonly.a
/usr/lib/golang/pkg/linux_amd64_race/crypto/x509
/usr/lib/golang/pkg/linux_amd64_race/crypto/x509.a
/usr/lib/golang/pkg/linux_amd64_race/crypto/x509/pkix.a
/usr/lib/golang/pkg/linux_amd64_race/database
/usr/lib/golang/pkg/linux_amd64_race/database/sql
/usr/lib/golang/pkg/linux_amd64_race/database/sql.a
/usr/lib/golang/pkg/linux_amd64_race/database/sql/driver.a
/usr/lib/golang/pkg/linux_amd64_race/debug
/usr/lib/golang/pkg/linux_amd64_race/debug/dwarf.a
/usr/lib/golang/pkg/linux_amd64_race/debug/elf.a
/usr/lib/golang/pkg/linux_amd64_race/debug/gosym.a
/usr/lib/golang/pkg/linux_amd64_race/debug/macho.a
/usr/lib/golang/pkg/linux_amd64_race/debug/pe.a
/usr/lib/golang/pkg/linux_amd64_race/debug/plan9obj.a
/usr/lib/golang/pkg/linux_amd64_race/encoding
/usr/lib/golang/pkg/linux_amd64_race/encoding.a
/usr/lib/golang/pkg/linux_amd64_race/encoding/ascii85.a
/usr/lib/golang/pkg/linux_amd64_race/encoding/asn1.a
/usr/lib/golang/pkg/linux_amd64_race/encoding/base32.a
/usr/lib/golang/pkg/linux_amd64_race/encoding/base64.a
/usr/lib/golang/pkg/linux_amd64_race/encoding/binary.a
/usr/lib/golang/pkg/linux_amd64_race/encoding/csv.a
/usr/lib/golang/pkg/linux_amd64_race/encoding/gob.a
/usr/lib/golang/pkg/linux_amd64_race/encoding/hex.a
/usr/lib/golang/pkg/linux_amd64_race/encoding/json.a
/usr/lib/golang/pkg/linux_amd64_race/encoding/pem.a
/usr/lib/golang/pkg/linux_amd64_race/encoding/xml.a
/usr/lib/golang/pkg/linux_amd64_race/errors.a
/usr/lib/golang/pkg/linux_amd64_race/expvar.a
/usr/lib/golang/pkg/linux_amd64_race/flag.a
/usr/lib/golang/pkg/linux_amd64_race/fmt.a
/usr/lib/golang/pkg/linux_amd64_race/go
/usr/lib/golang/pkg/linux_amd64_race/go/ast.a
/usr/lib/golang/pkg/linux_amd64_race/go/build.a
/usr/lib/golang/pkg/linux_amd64_race/go/constant.a
/usr/lib/golang/pkg/linux_amd64_race/go/doc.a
/usr/lib/golang/pkg/linux_amd64_race/go/format.a
/usr/lib/golang/pkg/linux_amd64_race/go/importer.a
/usr/lib/golang/pkg/linux_amd64_race/go/internal
/usr/lib/golang/pkg/linux_amd64_race/go/internal/gccgoimporter.a
/usr/lib/golang/pkg/linux_amd64_race/go/internal/gcimporter.a
/usr/lib/golang/pkg/linux_amd64_race/go/internal/srcimporter.a
/usr/lib/golang/pkg/linux_amd64_race/go/parser.a
/usr/lib/golang/pkg/linux_amd64_race/go/printer.a
/usr/lib/golang/pkg/linux_amd64_race/go/scanner.a
/usr/lib/golang/pkg/linux_amd64_race/go/token.a
/usr/lib/golang/pkg/linux_amd64_race/go/types.a
/usr/lib/golang/pkg/linux_amd64_race/hash
/usr/lib/golang/pkg/linux_amd64_race/hash.a
/usr/lib/golang/pkg/linux_amd64_race/hash/adler32.a
/usr/lib/golang/pkg/linux_amd64_race/hash/crc32.a
/usr/lib/golang/pkg/linux_amd64_race/hash/crc64.a
/usr/lib/golang/pkg/linux_amd64_race/hash/fnv.a
/usr/lib/golang/pkg/linux_amd64_race/hash/maphash.a
/usr/lib/golang/pkg/linux_amd64_race/html
/usr/lib/golang/pkg/linux_amd64_race/html.a
/usr/lib/golang/pkg/linux_amd64_race/html/template.a
/usr/lib/golang/pkg/linux_amd64_race/image
/usr/lib/golang/pkg/linux_amd64_race/image.a
/usr/lib/golang/pkg/linux_amd64_race/image/color
/usr/lib/golang/pkg/linux_amd64_race/image/color.a
/usr/lib/golang/pkg/linux_amd64_race/image/color/palette.a
/usr/lib/golang/pkg/linux_amd64_race/image/draw.a
/usr/lib/golang/pkg/linux_amd64_race/image/gif.a
/usr/lib/golang/pkg/linux_amd64_race/image/internal
/usr/lib/golang/pkg/linux_amd64_race/image/internal/imageutil.a
/usr/lib/golang/pkg/linux_amd64_race/image/jpeg.a
/usr/lib/golang/pkg/linux_amd64_race/image/png.a
/usr/lib/golang/pkg/linux_amd64_race/index
/usr/lib/golang/pkg/linux_amd64_race/index/suffixarray.a
/usr/lib/golang/pkg/linux_amd64_race/internal
/usr/lib/golang/pkg/linux_amd64_race/internal/boringtest.a
/usr/lib/golang/pkg/linux_amd64_race/internal/bytealg.a
/usr/lib/golang/pkg/linux_amd64_race/internal/cfg.a
/usr/lib/golang/pkg/linux_amd64_race/internal/cpu.a
/usr/lib/golang/pkg/linux_amd64_race/internal/execabs.a
/usr/lib/golang/pkg/linux_amd64_race/internal/fmtsort.a
/usr/lib/golang/pkg/linux_amd64_race/internal/goroot.a
/usr/lib/golang/pkg/linux_amd64_race/internal/goversion.a
/usr/lib/golang/pkg/linux_amd64_race/internal/lazyregexp.a
/usr/lib/golang/pkg/linux_amd64_race/internal/lazytemplate.a
/usr/lib/golang/pkg/linux_amd64_race/internal/nettrace.a
/usr/lib/golang/pkg/linux_amd64_race/internal/obscuretestdata.a
/usr/lib/golang/pkg/linux_amd64_race/internal/oserror.a
/usr/lib/golang/pkg/linux_amd64_race/internal/poll.a
/usr/lib/golang/pkg/linux_amd64_race/internal/profile.a
/usr/lib/golang/pkg/linux_amd64_race/internal/race.a
/usr/lib/golang/pkg/linux_amd64_race/internal/reflectlite.a
/usr/lib/golang/pkg/linux_amd64_race/internal/singleflight.a
/usr/lib/golang/pkg/linux_amd64_race/internal/syscall
/usr/lib/golang/pkg/linux_amd64_race/internal/syscall/execenv.a
/usr/lib/golang/pkg/linux_amd64_race/internal/syscall/unix.a
/usr/lib/golang/pkg/linux_amd64_race/internal/testenv.a
/usr/lib/golang/pkg/linux_amd64_race/internal/testlog.a
/usr/lib/golang/pkg/linux_amd64_race/internal/trace.a
/usr/lib/golang/pkg/linux_amd64_race/internal/unsafeheader.a
/usr/lib/golang/pkg/linux_amd64_race/internal/xcoff.a
/usr/lib/golang/pkg/linux_amd64_race/io
/usr/lib/golang/pkg/linux_amd64_race/io.a
/usr/lib/golang/pkg/linux_amd64_race/io/ioutil.a
/usr/lib/golang/pkg/linux_amd64_race/log
/usr/lib/golang/pkg/linux_amd64_race/log.a
/usr/lib/golang/pkg/linux_amd64_race/log/syslog.a
/usr/lib/golang/pkg/linux_amd64_race/math
/usr/lib/golang/pkg/linux_amd64_race/math.a
/usr/lib/golang/pkg/linux_amd64_race/math/big.a
/usr/lib/golang/pkg/linux_amd64_race/math/bits.a
/usr/lib/golang/pkg/linux_amd64_race/math/cmplx.a
/usr/lib/golang/pkg/linux_amd64_race/math/rand.a
/usr/lib/golang/pkg/linux_amd64_race/mime
/usr/lib/golang/pkg/linux_amd64_race/mime.a
/usr/lib/golang/pkg/linux_amd64_race/mime/multipart.a
/usr/lib/golang/pkg/linux_amd64_race/mime/quotedprintable.a
/usr/lib/golang/pkg/linux_amd64_race/net
/usr/lib/golang/pkg/linux_amd64_race/net.a
/usr/lib/golang/pkg/linux_amd64_race/net/http
/usr/lib/golang/pkg/linux_amd64_race/net/http.a
/usr/lib/golang/pkg/linux_amd64_race/net/http/cgi.a
/usr/lib/golang/pkg/linux_amd64_race/net/http/cookiejar.a
/usr/lib/golang/pkg/linux_amd64_race/net/http/fcgi.a
/usr/lib/golang/pkg/linux_amd64_race/net/http/httptest.a
/usr/lib/golang/pkg/linux_amd64_race/net/http/httptrace.a
/usr/lib/golang/pkg/linux_amd64_race/net/http/httputil.a
/usr/lib/golang/pkg/linux_amd64_race/net/http/internal.a
/usr/lib/golang/pkg/linux_amd64_race/net/http/pprof.a
/usr/lib/golang/pkg/linux_amd64_race/net/internal
/usr/lib/golang/pkg/linux_amd64_race/net/internal/socktest.a
/usr/lib/golang/pkg/linux_amd64_race/net/mail.a
/usr/lib/golang/pkg/linux_amd64_race/net/rpc
/usr/lib/golang/pkg/linux_amd64_race/net/rpc.a
/usr/lib/golang/pkg/linux_amd64_race/net/rpc/jsonrpc.a
/usr/lib/golang/pkg/linux_amd64_race/net/smtp.a
/usr/lib/golang/pkg/linux_amd64_race/net/textproto.a
/usr/lib/golang/pkg/linux_amd64_race/net/url.a
/usr/lib/golang/pkg/linux_amd64_race/os
/usr/lib/golang/pkg/linux_amd64_race/os.a
/usr/lib/golang/pkg/linux_amd64_race/os/exec.a
/usr/lib/golang/pkg/linux_amd64_race/os/signal
/usr/lib/golang/pkg/linux_amd64_race/os/signal.a
/usr/lib/golang/pkg/linux_amd64_race/os/signal/internal
/usr/lib/golang/pkg/linux_amd64_race/os/signal/internal/pty.a
/usr/lib/golang/pkg/linux_amd64_race/os/user.a
/usr/lib/golang/pkg/linux_amd64_race/path
/usr/lib/golang/pkg/linux_amd64_race/path.a
/usr/lib/golang/pkg/linux_amd64_race/path/filepath.a
/usr/lib/golang/pkg/linux_amd64_race/plugin.a
/usr/lib/golang/pkg/linux_amd64_race/reflect.a
/usr/lib/golang/pkg/linux_amd64_race/regexp
/usr/lib/golang/pkg/linux_amd64_race/regexp.a
/usr/lib/golang/pkg/linux_amd64_race/regexp/syntax.a
/usr/lib/golang/pkg/linux_amd64_race/runtime
/usr/lib/golang/pkg/linux_amd64_race/runtime.a
/usr/lib/golang/pkg/linux_amd64_race/runtime/cgo.a
/usr/lib/golang/pkg/linux_amd64_race/runtime/debug.a
/usr/lib/golang/pkg/linux_amd64_race/runtime/internal
/usr/lib/golang/pkg/linux_amd64_race/runtime/internal/atomic.a
/usr/lib/golang/pkg/linux_amd64_race/runtime/internal/math.a
/usr/lib/golang/pkg/linux_amd64_race/runtime/internal/sys.a
/usr/lib/golang/pkg/linux_amd64_race/runtime/pprof.a
/usr/lib/golang/pkg/linux_amd64_race/runtime/race.a
/usr/lib/golang/pkg/linux_amd64_race/runtime/trace.a
/usr/lib/golang/pkg/linux_amd64_race/sort.a
/usr/lib/golang/pkg/linux_amd64_race/strconv.a
/usr/lib/golang/pkg/linux_amd64_race/strings.a
/usr/lib/golang/pkg/linux_amd64_race/sync
/usr/lib/golang/pkg/linux_amd64_race/sync.a
/usr/lib/golang/pkg/linux_amd64_race/sync/atomic.a
/usr/lib/golang/pkg/linux_amd64_race/syscall.a
/usr/lib/golang/pkg/linux_amd64_race/testing
/usr/lib/golang/pkg/linux_amd64_race/testing.a
/usr/lib/golang/pkg/linux_amd64_race/testing/internal
/usr/lib/golang/pkg/linux_amd64_race/testing/internal/testdeps.a
/usr/lib/golang/pkg/linux_amd64_race/testing/iotest.a
/usr/lib/golang/pkg/linux_amd64_race/testing/quick.a
/usr/lib/golang/pkg/linux_amd64_race/text
/usr/lib/golang/pkg/linux_amd64_race/text/scanner.a
/usr/lib/golang/pkg/linux_amd64_race/text/tabwriter.a
/usr/lib/golang/pkg/linux_amd64_race/text/template
/usr/lib/golang/pkg/linux_amd64_race/text/template.a
/usr/lib/golang/pkg/linux_amd64_race/text/template/parse.a
/usr/lib/golang/pkg/linux_amd64_race/time
/usr/lib/golang/pkg/linux_amd64_race/time.a
/usr/lib/golang/pkg/linux_amd64_race/time/tzdata.a
/usr/lib/golang/pkg/linux_amd64_race/unicode
/usr/lib/golang/pkg/linux_amd64_race/unicode.a
/usr/lib/golang/pkg/linux_amd64_race/unicode/utf16.a
/usr/lib/golang/pkg/linux_amd64_race/unicode/utf8.a
/usr/lib/golang/pkg/linux_amd64_race/vendor
/usr/lib/golang/pkg/linux_amd64_race/vendor/golang.org
/usr/lib/golang/pkg/linux_amd64_race/vendor/golang.org/x
/usr/lib/golang/pkg/linux_amd64_race/vendor/golang.org/x/crypto
/usr/lib/golang/pkg/linux_amd64_race/vendor/golang.org/x/crypto/chacha20.a
/usr/lib/golang/pkg/linux_amd64_race/vendor/golang.org/x/crypto/chacha20poly1305.a
/usr/lib/golang/pkg/linux_amd64_race/vendor/golang.org/x/crypto/cryptobyte
/usr/lib/golang/pkg/linux_amd64_race/vendor/golang.org/x/crypto/cryptobyte.a
/usr/lib/golang/pkg/linux_amd64_race/vendor/golang.org/x/crypto/cryptobyte/asn1.a
/usr/lib/golang/pkg/linux_amd64_race/vendor/golang.org/x/crypto/curve25519.a
/usr/lib/golang/pkg/linux_amd64_race/vendor/golang.org/x/crypto/hkdf.a
/usr/lib/golang/pkg/linux_amd64_race/vendor/golang.org/x/crypto/internal
/usr/lib/golang/pkg/linux_amd64_race/vendor/golang.org/x/crypto/internal/subtle.a
/usr/lib/golang/pkg/linux_amd64_race/vendor/golang.org/x/crypto/poly1305.a
/usr/lib/golang/pkg/linux_amd64_race/vendor/golang.org/x/net
/usr/lib/golang/pkg/linux_amd64_race/vendor/golang.org/x/net/dns
/usr/lib/golang/pkg/linux_amd64_race/vendor/golang.org/x/net/dns/dnsmessage.a
/usr/lib/golang/pkg/linux_amd64_race/vendor/golang.org/x/net/http
/usr/lib/golang/pkg/linux_amd64_race/vendor/golang.org/x/net/http/httpguts.a
/usr/lib/golang/pkg/linux_amd64_race/vendor/golang.org/x/net/http/httpproxy.a
/usr/lib/golang/pkg/linux_amd64_race/vendor/golang.org/x/net/http2
/usr/lib/golang/pkg/linux_amd64_race/vendor/golang.org/x/net/http2/hpack.a
/usr/lib/golang/pkg/linux_amd64_race/vendor/golang.org/x/net/idna.a
/usr/lib/golang/pkg/linux_amd64_race/vendor/golang.org/x/net/nettest.a
/usr/lib/golang/pkg/linux_amd64_race/vendor/golang.org/x/sys
/usr/lib/golang/pkg/linux_amd64_race/vendor/golang.org/x/sys/cpu.a
/usr/lib/golang/pkg/linux_amd64_race/vendor/golang.org/x/text
/usr/lib/golang/pkg/linux_amd64_race/vendor/golang.org/x/text/secure
/usr/lib/golang/pkg/linux_amd64_race/vendor/golang.org/x/text/secure/bidirule.a
/usr/lib/golang/pkg/linux_amd64_race/vendor/golang.org/x/text/transform.a
/usr/lib/golang/pkg/linux_amd64_race/vendor/golang.org/x/text/unicode
/usr/lib/golang/pkg/linux_amd64_race/vendor/golang.org/x/text/unicode/bidi.a
/usr/lib/golang/pkg/linux_amd64_race/vendor/golang.org/x/text/unicode/norm.a

References

Summary

In this tutorial we learn how to install golang-race on CentOS 8 using yum and dnf.