Importing Packages

I am trying to download and install packages which are available on the internet in my project.
However when I am trying to do so, it gives me the following error in Bash Shell (Ubuntu 16.04):

package mkdir /home/sashank/go/src: permission denied


How do you try to download the packages?

And what permissions are set for ~/go/src? You can learn about those using ls -ld ~/go/src. Just show us the output.

I download the packages manually by going to Github and click on download!

You can do this:

$ chmod -R 0757 $GOPATH/src

Permissions seem to be ok, can you please check folder below that, which correspond to your packages path?

Definitely you don’t have a proper setup for Go environment. I see a VSCode there but I don’t know what’s behind. I suggest you to check your instalation, GOPATH, folders and so on. Basically in Ubuntu is no need to change any folder rights only if you did this before.
If you don’t succed, try gopei project who will proper install the entire environment. Because you seems to work with VSCode i suggest you to use gopei -s command to install only the compiler.

Thank you so much! I was able to solve it by re-installing and setting up the environment!! Thanks again

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.