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 · 11 comments

Comments

Projects
None yet
7 participants
@hzh8311
Copy link

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link
Author

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

commented Apr 25, 2017

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

This comment has been minimized.

Copy link

commented Apr 25, 2017

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

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link

commented Jun 19, 2018

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

This comment has been minimized.

Copy link

commented Jul 19, 2018

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

@99zombies

This comment has been minimized.

Copy link

commented May 8, 2019

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

This comment has been minimized.

Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.