-2

I'm trying to install Go, gRPC and Protobuf but I cant even install Go in the first place.

I followed steps mentioned in this site:

https://tecadmin.net/install-go-on-centos/

My bash_profile file looks like this now:

http://prntscr.com/nf2bm9

And when I try to test go installation by typing "go version" in the console I get this error:

-bash: go: command not found

Where did I go wrong?

Note: I navigated to /usr/local/ to see if there is any go folder with files or not to confirm the files has been downloaded and moved at the right place.

  • 2
    Did you relaunch your terminal for the `.bash_profile` to take effect? Are you *using* Bash? Have you done `echo $PATH` in the terminal to make sure the PATH is correct? Have you checked that `/usr/local/go/bin` exists? – ceejayoz Apr 22 '19 at 01:15
  • 1
    Didnt knew that I had to close and open a new Terminal Window. I just did echo $PATH and it spit out this and I dont even know what Im looking at : /home/ec2-user/ec2-user/GoServerFolder/bin:/usr/local/go/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/ec2-user/.local/bin:/home/ec2-user/bin –  Apr 22 '19 at 01:18
  • I dont know why it spit out "ec2-user" 2 times, because I only have 1 folder with that name. –  Apr 22 '19 at 01:20
  • @ceejayoz Do you think everything is fine? Am I over reacting? –  Apr 22 '19 at 01:23
  • Well, does `go version` work after relaunching your terminal? – ceejayoz Apr 22 '19 at 01:24
  • Yes "go version" works. –  Apr 22 '19 at 01:34
  • Then it sounds like things work fine. `$PATH` tells your terminal where to look for executables, separated by `:` marks. You have several subfolders of `ec2-user`; that's fairly common. – ceejayoz Apr 22 '19 at 01:38

1 Answers1

1

Changes to your .bash_profile file only take effect after you relaunch the terminal.

source ~/.bash_profile will reload it in your current session, if you'd rather take that approach.

ceejayoz
  • 176,543
  • 40
  • 303
  • 368