0

I followed the below steps to set up a workspace for go in ubuntu 16.

1.Downloaded go 1.14 version for linux from https://golang.org/

2.Extracted it in the /usr/local using the command-

sudo tar -C /usr/local -xzf go1.14.4.linux-amd64.tar.gz

3.Added path in the .profile by adding the line

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

4.Sourced this in the session with command -

source ~/.profile

5.Checked go version

But the terminal returns the error

The program 'go' is currently not installed. You can install it by typing: sudo apt install golang-go

Can anyone please explain where I am going wrong with this ?

4
  • Sorry, both of those things were written by mistake. I'm editing the question.
    – JSnow
    Jun 22, 2020 at 14:57
  • Now what is the output of echo "$PATH"? What is the output of ls -l /usr/local/go/bin/go? Jun 22, 2020 at 15:01
  • echo $PATH prints /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin and ls -l /usr/local/go/bin/go prints -rwxr-xr-x 1 root root 15307838 Apr 9 00:47 /usr/local/go/bin/go
    – JSnow
    Jun 22, 2020 at 15:05
  • Please put this information in the body of the question. Jun 22, 2020 at 15:47

0

You must log in to answer this question.

Browse other questions tagged .