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: cannot find module providing package error while go build #34985
Comments
The diagnostic messages for this sort of error are generally much clearer in Go 1.13. Please try Go 1.13.3 and see what you get. |
I remember it is like I found the above clause in the go repo while trying to find possible solutions, but this output does not seem to be mentioned in the issue area, so i tried a previous version,go1.12.6, and still could not work properly Currently not have my laptop at hand, will provide the precise output later. |
it is
|
@qzyse2017, please provide more detail. The But (2) implies that the error message should be So it appears that your
|
sorry, i did not run when in the
|
also tried building with docker image opensuse/leap:15.1, with go1.13.3, and it build successfully
|
some other info which may be helpful
|
try it in my another laptop with the same OS,the code build successfully and
|
I finally get it work correctly by removing environment variable |
Thanks for following up. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
yes
What operating system and processor architecture are you using (
go env
)?NAME="openSUSE Leap"
VERSION="15.1 "
ID="opensuse-leap"
go env
OutputGOARCH="amd64"
GOBIN="/home/zyck/go/bin"
GOCACHE="/home/zyck/.cache/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/zyck/go"
GOPROXY="https://goproxy.io"
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/dev/null"
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 -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build270463791=/tmp/go-build -gno-record-gcc-switches"
What did you do?
make a new directory ,
testdir
in home/zyck/go/src/write a go file with code from https://github.com/PuerkitoBio/goquery#examples
under
testdir
, rungo build
What did you expect to see?
no output, the file build successfully
What did you see instead?
output:
build testdir cannot load github.com/PuerkitoBio/goquery: cannot find module providing package github.com/PuerkitoBio/goquery
no executable file generated
The text was updated successfully, but these errors were encountered: