Okay, I have just tested it on my VPS and we have to do one more thing.
cd ~ && nano .profile - I assume that you have nano installed. If not then run
sudo apt-get install nanoThere is probably a lot of mess there. Delete everything
EXCEPT the code below
# ~/.profile: executed by Bourne-compatible login shells.
if [ "$BASH" ]; then
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
fi
mesg n || true
Press CTRL+O at the same time and then enter to save the file. Press CTRL+X to leave the editor.
echo 'PATH="$PATH:/usr/local/go/bin"' >> ~/.profile - Log out after this command and try using the command from Zap connect
By the way, does
snap command work for you? I am running Ubuntu 18.04 on my VPS and it suggested using
sudo snap install go -classic (it would download the latest version). Give it a try if the rest doesn't work!
By the way, when I installed go the first time around with "sudo apt-get install golang" I got go version go1.7.4 linux/arm. Not sure if that helps
It proves that the package was out-of-date (1.7.4 was released at the end of 2016!).
This is what I have when opening up nano. Mine seems a bit different than yours, particularly the beginning "# ~/.profile: executed by Bourne-compatible login shells."
GNU nano 2.7.4 File: .profile
# ~/.profile: executed by the command interpreter for login shells.
# This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login
# exists.
# see /usr/share/doc/bash/examples/startup-files for examples.
# the files are located in the bash-doc package.
# the default umask is set in /etc/profile; for setting the umask
# for ssh logins, install and configure the libpam-umask package.
#umask 022
# if running bash
if [ -n "$BASH_VERSION" ]; then
# include .bashrc if it exists
if [ -f "$HOME/.bashrc" ]; then
. "$HOME/.bashrc"
fi
fi
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
export GOPATH=$HOME/go
PATH="$HOME/go/bin:$PATH"
export GOPATH=$HOME/go
PATH="$HOME/go/bin:$PATH"
export GOPATH=$HOME/go
PATH="$HOME/go/bin:$PATH"
export GOPATH=$HOME/go
PATH="$HOME/go/bin:$PATH"
export GOPATH=$HOME/go
PATH="$HOME/go/bin:$PATH"