Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

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

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

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

in

  • $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

>Solution :

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

not

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

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading