My instance works fine without it in Linux.Ī common thing I've seen developers do, is to set the GOROOT environment variable. That GoLand /usr/local/go in GoLand shouldn't be there. Posting it here will let others call out what is misconfigured. You'll be able to see what was configured or misconfigured when the version of go was compiled/installed that you're using. Then run env|sort|grep "^GO" again to see if you missed any. Then disable them using unset for each one. Run a env|sort|grep "^GO" to see what you have set. GOMODCACHE when not being explicitly set by the user, is implicitly defaulted to the GOPATH with /pkg/mod appended onto it. You want to figure out why that's happening, instead of possibly just trying to work around it, as other things could be misconfigured as well. Go: writing go.mod cache: mkdir /usr/local/go/pkg/mod: permission denied sounds like the GOMODCACHE variable is possible set incorrectly, but it likely won't be the ROOT cause. We've been using it for years without issue. GoLand is the Go IDE of choice on my team. Installing a version in your userspace (without sudo), can work around that carnage, and keep you in control. It's also not unheard of for your IT gurus to compile it incorrectly, and/or to compile it correctly, but then install it into a non-matching location. I can provide any other info that is needed.Įither install the version of go that came with your distro, or if your IT gurus want you to not have sudo, install it in your userspace (sudo is not required). I have brand new linux set up and am trying to get a go project up and running and struggling. In my ~/.profile - export GOPATH=$HOME/goĮxport PATH=$PATH:/usr/local/go/bin:$GOPATH/bin Gopkg.in/natefinch/lumberjack.v2: mkdir /usr/local/go/pkg/mod: permission denied gorilla/mux: mkdir /usr/local/go/pkg/mod: permission denied Go: downloading gopkg.in/natefinch/lumberjack.v2 v2.0.0 Go: writing go.mod cache: mkdir /usr/local/go/pkg/mod: permission denied Here is the error I'm getting - go: writing go.mod cache: mkdir /usr/local/go/pkg/mod: permission denied I been trying for sometime now through google searches but nothing is working. My biggest issue is not understand the errors, or how to fix them. DocumentationĪs the title says I can't seem to configure my environment correctly on linux to be able use go modules. Please keep in mind, this is for 1st party postings only. To avoid too much noise from companies, please post job openings there. We have a monthly "Who's Hiring?" post that will stay pinned to the top of the subreddit. Do Not Post Pirated Materialĭo not post links to or instructions on how to get pirated copies of copyrighted material. We ask that you not post about closed-source / paid software that is not specifically aimed at Go developers in particular (as opposed to all developers), even if it is written in Go. This includes: - Articles about the language itself - Announcements & articles about open source Go libraries or applications - Dev tools (open source or not) specifically targeted at Go developers Posts must be of interest to Go developers and related to the Go language. Treat everyone with respect and kindness. Follow the Go Code of ConductĪs a part of the Go community, this subreddit and those who post on it should follow the tenets laid out in the Go Code of Conduct: Take responsibility for your words and actions, including their consequences, whether intended or otherwise. Avoid snarking (pithy, unproductive, sniping comments) Avoid discussing potentially offensive or sensitive issues this all too often leads to unnecessary conflict. Avoid unconstructive criticism: don't merely decry the current state of affairs offer-or at least solicit-suggestions as to how things may be improved. Be constructive.Īvoid derailing: stay on topic if you want to talk about something else, start a new conversation. When we do disagree, try to understand why. Interpret the arguments of others in good faith, do not seek to disagree. In particular, respect differences of opinion. Remember that sometimes it is best to refrain entirely from commenting. Think about how your words will be interpreted. Productive communication requires effort. (Meaning and tone can be lost in translation.) 3. Remember that people have varying communication styles and that not everyone is using their native language. Post is not in keeping with an inclusive and friendly technical atmosphere.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |