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

cmd/go: go build does not show that git (?) is not installed, instead shows general "cannot find module for path " #29891

Closed
nicknaychov opened this issue Jan 23, 2019 · 5 comments
Labels
FrozenDueToAge modules NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Milestone

Comments

@nicknaychov
Copy link

What version of Go are you using (go version)?

go version go1.11.4 linux/amd64

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

go env Output
GOARCH="amd64"
GOBIN=""
GOCACHE="/root/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/root/GOprojects"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/nickn/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build125501625=/tmp/go-build -gno-record-gcc-switches"

What did you do?

When you try to enable modules and use go.mod

when you try to run the quick example from https://github.com/golang/go/wiki/Modules
you get
build github.com/you/hello: cannot find module for path rsc.io/quote

BTW error happens does not matter what modules you try to import. Just decided to give simplest example.

What did you expect to see?

you should see clear error that GitHub is not installed on your system.

What did you see instead?

build github.com/you/hello: cannot find module for path rsc.io/quote

which is quite confusing and general error...
Same can be reproduces on Windows as well.

@robpike
Copy link
Contributor

robpike commented Jan 23, 2019

Do you mean git? GitHub is a web site but it is also a desktop UI for talking to GitHub.

@FiloSottile FiloSottile changed the title go build does not show that Github is not installed, instead shows general "cannot find module for path " gmd/go: go build does not show that git (?) is not installed, instead shows general "cannot find module for path " Jan 23, 2019
@FiloSottile FiloSottile added WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. modules labels Jan 23, 2019
@FiloSottile FiloSottile added this to the Go1.13 milestone Jan 23, 2019
@odeke-em odeke-em changed the title gmd/go: go build does not show that git (?) is not installed, instead shows general "cannot find module for path " cmd/go: go build does not show that git (?) is not installed, instead shows general "cannot find module for path " Jan 23, 2019
@agnivade
Copy link
Contributor

This should be fixed in 1.12. Please try with 1.12beta2.

@nicknaychov
Copy link
Author

nicknaychov commented Jan 24, 2019 via email

@nicknaychov
Copy link
Author

Thanks for fixing. I lost couple hours reading manuals and wondering why it does not work, my setup was following all official manuals. But those manuals were not mentioning that you need installed git. Please fix that as well for all newbies. Then I gave up, start swearing and decided to go old way and just use go get. That command showed me that git was missing. Once installed everything was working as in the manuals.

@agnivade
Copy link
Contributor

But those manuals were not mentioning that you need installed git. Please fix that as well for all newbies.

Please open a new issue for that, specifically mentioning which docs you felt were missing. This thread already has a different context. Thanks.

@golang golang locked and limited conversation to collaborators Jan 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge modules NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. WaitingForInfo Issue is not actionable because of missing required information, which needs to be provided.
Projects
None yet
Development

No branches or pull requests

5 participants