go: command not found

I am getting this error message after I installed go on a second computer--go: command not found.

This pc is running ubuntu 11.01. I was able to install go a few days ago using sudo apt-get install golang-stable.

I decided to do a fresh install, this time compiling from source so that go will be installed in $HOME/go.

After the compile and install, I do go run a.go and I get go: command not found. I'm going to google for a solution, then update this blog post how I fixed this.

I couldn't figure it out. I chose to do a reinstall, using sudo apt-get install golang-stable.

To remove the tarball go install, I did sudo rm -rf go, as I read from http://weekly.golang.org/doc/install

It works, as I mentioned earlier. What's different is that golang was installed in /usr/lib/go. Just to be sure, I added export PATH=$PATH:/usr/lib/go/bin in my .bashrc

1 comment: