Installing Go 16.6 on Ubuntu 20.4

I used the following code to download and install the latest Go version

wget -c https://dl.google.com/go/go1.16.6.linux-amd64.tar.gz -O - | sudo tar -xz -C /usr/local

Everything seemed to have gone alright, however, when I try to verify the installation using:

go version 

I get the following error:

-bash: /usr/local/go/bin/go: cannot execute binary file: Exec format error

I have been searching for a solution but could not find anything helpful yet. I am trying to install Go on an s390x arch instead of standard amd64.


@steeldriver mentioned that go specific build for s390x is available on the go download page

If you scroll down the GO Downloads page, there is go1.16.6.linux-s390x.tar.gz ...

I installed this version and the problem is resolved.