But you didn’t install Go yet. You just downloaded the binaries.
You need to run this command before setting up the path (maybe you’ve done it before but I don’t see it). :
tar -C /usr/local -xzf go1.9.2.linux-amd64.tar.gz
So have you made sure that there is neither of them?
Also have you logged out and in again. You have usually to do that when changing your ~/.profile that the system catches the changes.
Also when you want to go build a package X, it needs to be available in your GOPATH. In the terminal session you show, to us, the source is not in your GOPATH, neither in the one specified in the .profile ($HOME/broch/work), nor in the one thats currently used ($HOME/go).
Good point. In answer, no, alas I did not reboot/re-login although I thought about it as a possible solution. I’ve got a lot of tabs open in a browser (yes session saver but still) and leave my machine on 24-7 for boinc application so I go days between reboot, but that may have solved the issue before creating a thread. Nevertheless the insight from the responses so far has been very helpful and I’ve already learned a few things. Will report results.
I used these basic steps to get up and running with the latest version of go on Debian 9. The environment is similar enough to Ubuntu, so these steps may help.
Note that I already had plenty of packages installed to help me build other development projects. You may need to install certain packages to help with the source build. That is usually very easy, since Debian/Ubuntu provides a very rich assortment of developer packages.
Note that this method of installation puts the go directories under your personal account, which is nice for learning. If you want to restructure go for “correct” deployment on your distribution, you will need to consult the packaging documentation for your distribution.
I typed many of these steps in from memory, so I cannot guarantee they are all 100% correct. I do know for sure that installation (from sources) is relatively simple and works, once you know what to do.
# INSTALL FROM SOURCES (NEED A LINX BINARY DIST TO BOOT THE GO BUILD PROCESS
# GO REQUIRES A WORKING VERSION OF GO TO BUILD FROM SOURCES
# DOWNLOAD BINARY FOR MY ARCHITECTURE
https://golang.org/doc/install?download=go1.9.2.linux-amd64.tar.gz
# DOWNLOAD LATEST SOURCES
https://golang.org/doc/install/source?download=go1.9.2.src.tar.gz
# EXTRACT BINARY DIST INTO SOME DIRECTORY AND SET ENVIRONMENT VARIABLE TO POINT TO THIS BINARY DIST
cd ~/path/to/goboot
tar xvf go1.9.2.linux-amd64.tar.gz
export GOROOT_BOOTSTRAP=/path/to/goboot/go
# EXTRACT SOURCES INTO SOME OTHER DIRECTORY AND BUILD THE SOURCES
cd ~/path/to/goinstall
tar xvf go1.9.2.src.tar.gz
cd go/src
./all.bash
# SET YOUR WORKING SHELL TO FIND THE GOPATH AND THE GO BINARY
cd ~/
vim .bashrc
a (or whatever)
export GOPATH=~/path/to/goprojects
export PATH=~/path/to/goinstall/bin:$PATH
:w
^D
bash
# YOU NEED TO FOLLOW THE GO CONVENTIONS FOR STRUCTURING YOUR PROJECTS
# YOU WILL CREATE YOUR GO PROJECTS UNDER ~/path/to/goprojects