I have the latest versions of Visual Studio Code and Go compiler. When I am trying to build file in Visual Studio Code terminal using go build [FILENAME] I get this output:
The program 'go' can be found in the following packages: * golang-go * gccgo-go Try: sudo apt install <selected package>

But doing the same thing in separate terminal window works fine. How can it be fixed?


Well, I found solution for my problem. I forgot to add export PATH=$PATH:/usr/local/go/bin to /etc/profile/

|improve this answer|||||
  • It seems you did strange things. /usr/local/ is for manually installed software. Why do not use packaged system-wide versions? It is not Windows, you do not need to walk through all internet while searching MSI, EXE and MSP. – N0rbert Jan 20 '18 at 16:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.