Error while compiling govmomi (Go vSphere API) on Linux AMD64

arctic:~/gocode/src/github.com/vmware/govmomi$ make all
go get golang.org/x/tools/cmd/goimports
package golang.org/x/tools/cmd/goimports: unrecognized import path “golang.org/x/tools/cmd/goimports” (https fetch: Get https://golang.org/x/tools/cmd/goimports?go-get=1: x509: certificate signed by unknown authority)
Makefile:8: recipe for target ‘vendor’ failed
make: *** [vendor] Error 1

Below is the Makefile for this product -

.PHONY: test

all: check test

check: goimports govet

vendor:
go get golang.org/x/tools/cmd/goimports
go get github.com/davecgh/go-spew/spew
go get golang.org/x/net/context

goimports: vendor
@echo checking go imports…
@! goimports -d . 2>&1 | egrep -v ‘^$$’

govet:
@echo checking go vet…
@go tool vet -structtags=false -methods=false .

test: vendor
go test -v $(TEST_OPTS) ./…

install: vendor
go install github.com/vmware/govmomi/govc

Any help appreciated.

My environment -

GOARCH=“amd64"
GOBIN=”“
GOEXE=”"
GOHOSTARCH=“amd64"
GOHOSTOS=“linux"
GOOS=“linux"
GOPATH=”/home/vmware/gocode"
GORACE=”“
GOROOT=”/usr/lib/go-1.6"
GOTOOLDIR=”/usr/lib/go-1.6/pkg/tool/linux_amd64"
GO15VENDOREXPERIMENT="1"
CC=“gcc"
GOGCCFLAGS=”-fPIC -m64 -pthread -fmessage-length=0"
CXX="g++"
CGO_ENABLED=“1”

Something is interfering with your connection to https://golang.org/, possibly there is a proxy or other MITM device in the way, or your clock is very wrong.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.