Glide: Glide is trying to fetch stdlib packages

Created on 22 Aug 2016  Â·  2Comments  Â·  Source: Masterminds/glide

Hi. Let's say I have a hello world app in main.go file which imports stdlib packages

import (
    "fmt"
    "net"
    "os"
    "time"
)

glide update, as well as glide get gtihub/some/package are refusing to work with this log:

⇒  glide up
[INFO]  Downloading dependencies. Please wait...
[INFO]  No references set.
[INFO]  Resolving imports
[INFO]  Fetching fmt into /mypath/vendor
[ERROR] Error looking for fmt: Cannot detect VCS
[INFO]  Fetching net into /mypath/vendor
[ERROR] Error looking for net: Cannot detect VCS
[INFO]  Fetching os into /mypath/vendor
[ERROR] Error looking for os: Cannot detect VCS
[INFO]  Fetching time into /mypath/vendor
[ERROR] Error looking for time: Cannot detect VCS
[INFO]  Downloading dependencies. Please wait...
[INFO]  --> Fetching updates for time.
[INFO]  --> Fetching updates for net.
[INFO]  --> Fetching updates for os.
[INFO]  --> Fetching updates for fmt.
[WARN]  Unable to checkout time
[ERROR] Update failed for time: Cannot detect VCS
[WARN]  Unable to checkout os
[ERROR] Update failed for os: Cannot detect VCS
[WARN]  Unable to checkout fmt
[ERROR] Update failed for fmt: Cannot detect VCS
[WARN]  Unable to checkout net
[ERROR] Update failed for net: Cannot detect VCS
[ERROR] Could not update packages: Cannot detect VCS
Cannot detect VCS
Cannot detect VCS
Cannot detect VCS

my go env is

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/usr/local/opt/go/libexec"
GORACE=""
GOROOT="/usr/local/Cellar/go/1.7/libexec"
GOTOOLDIR="/usr/local/Cellar/go/1.7/libexec/pkg/tool/darwin_amd64"
CC="clang"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/8m/3jml9sls04ddkpb_2l2wst340000gn/T/go-build933196793=/tmp/go-build -gno-record-gcc-switches -fno-common"
CXX="clang++"
CGO_ENABLED="1"

glide version is

⇒  glide --version
glide version v0.11.1

glide.yaml is

package: .
import: []

Most helpful comment

It appears your GOPATH is set to a GOROOT location rather than a proper GOPATH. It picks up stdlib packages because the stdlib is in your GOPATH.

All 2 comments

It appears your GOPATH is set to a GOROOT location rather than a proper GOPATH. It picks up stdlib packages because the stdlib is in your GOPATH.

Oh wow. Thank you, it works now.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

james-lawrence picture james-lawrence  Â·  5Comments

ikouchiha47 picture ikouchiha47  Â·  6Comments

mh-cbon picture mh-cbon  Â·  3Comments

jaxxstorm picture jaxxstorm  Â·  3Comments

hlltarakci picture hlltarakci  Â·  4Comments