sql-migrate: Cannot go get from a fresh machine
This is a machine which has no golang code on it, like a fresh install
OUTPUT
mau@mbp15:~$ go get -v github.com/rubenv/sql-migrate/...
github.com/rubenv/sql-migrate (download)
get "gopkg.in/gorp.v1": found meta tag get.metaImport{Prefix:"gopkg.in/gorp.v1", VCS:"git", RepoRoot:"https://gopkg.in/gorp.v1"} at //gopkg.in/gorp.v1?go-get=1
gopkg.in/gorp.v1 (download)
github.com/denisenkom/go-mssqldb (download)
github.com/golang-sql/civil (download)
get "golang.org/x/crypto/md4": found meta tag get.metaImport{Prefix:"golang.org/x/crypto", VCS:"git", RepoRoot:"https://go.googlesource.com/crypto"} at //golang.org/x/crypto/md4?go-get=1
get "golang.org/x/crypto/md4": verifying non-authoritative meta tag
golang.org/x/crypto (download)
github.com/go-sql-driver/mysql (download)
github.com/lib/pq (download)
github.com/mattn/go-sqlite3 (download)
github.com/mitchellh/cli (download)
github.com/armon/go-radix (download)
github.com/bgentry/speakeasy (download)
github.com/fatih/color (download)
github.com/mattn/go-isatty (download)
github.com/posener/complete (download)
github.com/hashicorp/go-multierror (download)
github.com/hashicorp/errwrap (download)
package github.com/rubenv/sql-migrate/sql-migrate
imports github.com/posener/complete/cmd/install: cannot find package "github.com/posener/complete/cmd/install" in any of:
/usr/local/Cellar/go/1.13.4/libexec/src/github.com/posener/complete/cmd/install (from $GOROOT)
/Users/mau/go/src/github.com/posener/complete/cmd/install (from $GOPATH)
github.com/olekukonko/tablewriter (download)
github.com/mattn/go-runewidth (download)
get "gopkg.in/yaml.v2": found meta tag get.metaImport{Prefix:"gopkg.in/yaml.v2", VCS:"git", RepoRoot:"https://gopkg.in/yaml.v2"} at //gopkg.in/yaml.v2?go-get=1
ENVIRONMENT
mau@mbp15:~$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/mau/Library/Caches/go-build"
GOENV="/Users/mau/Library/Application Support/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/mau/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/Cellar/go/1.13.4/libexec"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.13.4/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
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=/var/folders/82/3klc7kss6wgfrx9t54sdd8zw0000gn/T/go-build159606206=/tmp/go-build -gno-record-gcc-switches -fno-common"
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 5
- Comments: 18 (8 by maintainers)
I think you can close this issue. If you are interesting on insights from this journey, I’ve written a blog post on it 😃 https://posener.github.io/branch-strategy/
Thanks for the help!
I updated the default branch. Looking for a solution if anyone has one.
On Wed, Nov 20, 2019, 10:09 Ivan Skriabin notifications@github.com wrote:
I cannot seem to import this library anymore, it seems to be some dependency to https://github.com/mattn/go-sqlite3 which has a recently closed issue here but I don’t think it’s fixed properly
If i try to
go get -u github.com/rubenv/sql-migrateI see the following error
TL/DR:
GO111MODULE=on GOPRIVATE=github.com/mattn/go-sqlite3 go get github.com/rubenv/sql-migrate/...details:
sql-migratedepends ongithub.com/mitchellh/cli, which in turn depends ongithub.com/posener/completeThis error happens because you try to
go get github.com/rubenv/sql-migrate/...in no-module aware mode, but:posener/completewas upgraded to v2 whilemitchellh/clistill relies onposener/completev1Since in your case
go getdoes not know about modules, it will try to download latestposener/completev2 from master branch, which does not work withmitchellh/cli.You can fix this by installing sql-migrate in module-aware mode.
But, then you will bump into another unrelated error described here https://github.com/mattn/go-sqlite3/issues/755. To temporary work around it you should disable proxy cache for go-sqlite3:
GO111MODULE=on GOPRIVATE=github.com/mattn/go-sqlite3 go get github.com/rubenv/sql-migrate/...@posener Yeah