Unable to set GOPATH in elementary os loki

185 Views Asked by At

Input :

echo "GOPATH=/home/chawat/Programming/GoWorkspace" >> ~/.bashrc

echo "export GOPATH" >> ~/.bashrc

echo "PATH=\$PATH:\$GOPATH/bin" >> ~/.bashrc

source ~/.bashrc

Output:

bash: /home/chawat/.bashrc: line 171: syntax error near unexpected token `newline'

bash: /home/chawat/.bashrc: line 171: `esacGOPATH=/home/chawat/Programming/GoWorkspace'

plz help me whats wrong?

1

There are 1 best solutions below

0
On BEST ANSWER

It sounds like .bashrc was not terminated by a newline before you ran those commands. Look at the end of the file in a text editor and make sure that GOPATH=/home/chawat/Programming/GoWorkspace starts on a line of its own.