Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I installed Go (programming language) to Max OS X but "go version" in terminal gives

-bash: go: command not found

Echoing $PATH returns:

/Users/user/.rvm/gems/ruby-1.9.3-p194/bin:/Users/user/.rvm/gems/ruby-1.9.3-p194@global/bin:/Users/user/.rvm/rubies/ruby-1.9.3-p194/bin:/Users/user/.rvm/bin:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/sbin:/usr/sbin

What do I need to change to start using Go?

share|improve this question
1  
How did you install it? –  Ignacio Vazquez-Abrams Sep 9 '12 at 17:18
    
The installer linked here: golang-book.com –  barcodesIllIIIlIl Sep 9 '12 at 17:55
add comment

1 Answer

up vote 2 down vote accepted

Go should be installed to either /usr/local/go/bin or ~/Go/bin — I can't test the installer now.

Try editing your ~/.bash_profile by calling:

nano ~/.bash_profile

Then adding:

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

Save the file by pressing CtrlO, then , and reload your shell (e.g. by restarting the Terminal). Now, go should work as a command, assuming it is provided as /usr/local/go/bin/go.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.