Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"go get -u github.com/nsf/gocode" don't do anything for me. #359

Open
hzh8311 opened this issue Jul 1, 2016 · 14 comments
Open

"go get -u github.com/nsf/gocode" don't do anything for me. #359

hzh8311 opened this issue Jul 1, 2016 · 14 comments

Comments

@hzh8311
Copy link

hzh8311 commented Jul 1, 2016

As the title, when I run the command, it do nothing for me.
And I set the $GOPATH, but there is nothing inside $GOPATH/src/github.com . And there is also no hint after run the command.

@dmitshur
Copy link

dmitshur commented Jul 1, 2016

Are you able to install any other Go packages successfully?

If not, it sounds like your Go installation is broken. I would recommend removing Go and installing it again. See https://golang.org/doc/install.

go get -u github.com/nsf/gocode works okay for me.

@hzh8311
Copy link
Author

hzh8311 commented Jul 1, 2016

It doesn't work for other package either.
And I work on Ubuntu 16.04 and I installed the golang-go by aptitude, Does it better installed by the package on the website you give above?

@dmitshur
Copy link

dmitshur commented Jul 1, 2016

Yes, I would highly recommend installing Go from its website rather than a package manager. In most cases, it's much easier, more up to date, and works flawlessly.

Don't forget to remove your previous installation of Go from aptitude first.

Also, make sure you have git installed, since Go uses that to fetch git repositories.

@dmitshur
Copy link

dmitshur commented Jul 1, 2016

It's also really easy. On Linux, you can simply do:

# Install Go on Linux.
curl -L https://golang.org/dl/go1.8.1.linux-amd64.tar.gz | sudo tar zx -C /usr/local/

# Add to ~/.bash_profile.
export PATH="$PATH:/usr/local/go/bin:$HOME/go/bin"

Edit: Updated for Go 1.8.1. It's even easier now, because one can rely on default value of GOPATH instead of having to set it.

@holtzermann17
Copy link

You should

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

so that the newly installed version will be used rather than some other version that might be on your path.

@dmitshur
Copy link

It's probably even better to uninstall some older version rather than sweep it under the rug. My instructions were for a clean Linux installation that does not have Go installed.

@CapitanShinChan
Copy link

CapitanShinChan commented Jan 10, 2018

I have a similar problem in a Windows 10 machine. I could install many other tools without any problem, but gocode keeps failing.

image

image

image

I tried to add the GOPATH to the system PATH variable, but I'm getting the same error:
image

@nitishbhushan2013
Copy link

In fact I am also on the same boat.
I installed golang on window 7. Installation is successful.
But Go extension on VS code keeps failing.

Installing github.com/nsf/gocode FAILED. Almost all the packages are failing.
Installing github.com/uudashr/gopkgs/cmd/gopkgs FAILED
Installing github.com/ramya-rao-a/go-outline FAILED
Installing github.com/acroca/go-symbols FAILED
Installing golang.org/x/tools/cmd/guru FAILED
Installing golang.org/x/tools/cmd/gorename FAILED
Installing github.com/acroca/go-symbols FAILED
Installing golang.org/x/tools/cmd/guru FAILED
Installing golang.org/x/tools/cmd/gorename FAILED
Installing github.com/acroca/go-symbols FAILED
Installing golang.org/x/tools/cmd/guru FAILED
Installing golang.org/x/tools/cmd/gorename FAILED
Installing github.com/fatih/gomodifytags FAILED

@flip1688
Copy link

If you installed from .msi delete your go directory and reinstall by using .zip

@99zombies
Copy link

Have same problem, "go get" command not working on Ubuntu 19.0.1, all paths configured correctly.
under = sudo nano ~./profile, and restart.
Have run "go version" + "go env", they are working.
Git version = 2.20.1 and Go version = 1.11, all latest versions.

@dmitshur
Copy link

dmitshur commented May 8, 2019

@99zombies This is an old issue. There are different causes that can lead to the same outcome, and it's likely the people above had another instance of this problem.

I suggest looking through the page at https://golang.org/wiki/InstallTroubleshooting, and if you're still having no luck, try asking in one of the resources listed at https://golang.org/help.

@SukumarMehta
Copy link

FYI - I had the same issue - I resolved it by setting GOPATH to a valid path

@UglyWillDuckling
Copy link

For me, the problem was fixed by setting the value of the env variable GO111MODULE from "on" to
"off". The variable was added to enable requiring a specific module version, read more https://dev.to/maelvls/why-is-go111module-everywhere-and-everything-about-go-modules-24k.

@ugale-deepak3010
Copy link

go get -u github.com/nsf/gocode
I am using this command does not return anything
I am using windows10 platform I have git && github and also go version go1.16.3 windows/amd64
so plz anyone respond me if any solution

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants