Go: /usr/local/go/bin does not exist on CentOS 7.9


I’m on a CentOS 7.9 virtual machine and I’m trying to install Go following this procedure (rif. https://computingforgeeks.com/install-go-golang-on-centos-rhel-linux/)

sudo yum -y install wget

wget https://go.dev/dl/go1.19.3.src.tar.gz

sha256sum go1.19.3.src.tar.gz

sudo tar -C /usr/local -xzf go*.src.tar.gz

Then I’ve added

export PATH=$PATH:/usr/local/go/bin


  • $HOME/.profile
  • /etc/profile

and finally

source $HOME/.profile

source /etc/profile

But when I try the command

go version

the result is

-bash: go: command not found

I’ve seen that no bin directory is under /usr/local/go path as shown in the picture

enter image description here

Any suggestion will be appreciated and thank you in advance


Looks like you are downloading the source, not the binary. You should be doing

wget https://go.dev/dl/go1.19.3.linux-amd64.tar.gz


wget https://go.dev/dl/go1.19.3.src.tar.gz

Answered By – dave

Answer Checked By – Marie Seifert (GoLangFix Admin)

Leave a Reply

Your email address will not be published.