tools / godep

dependency tool for go
http://godoc.org/github.com/tools/godep
BSD 3-Clause "New" or "Revised" License
5.54k stars 455 forks source link

godep: Error determining major go version from: "xgcc" #497

Open JasonCoombs opened 8 years ago

JasonCoombs commented 8 years ago

Expected behavior

Happiness

Actual behavior

Sadness

Steps to reproduce behavior

on Ubuntu 14.04:
$ go
The program 'go' is currently not installed. To run 'go' please ask your administrator to install the package 'gccgo-go'

$sudo apt-get install gccgo-go

Then, with $GOPATH and $PATH set correctly:

$go install github.com/tools/godep
$godep version

godep version output

godep: Error determining major go version from: "xgcc"

go version output

go version xgcc (Ubuntu 4.9.3-0ubuntu4) 4.9.3 linux/amd64

Contents of Godeps.json file

{
        "ImportPath": "github.com/tools/godep",
        "GoVersion": "go1.7",
        "GodepVersion": "v74",
        "Deps": [
                {
                        "ImportPath": "github.com/kr/fs",
                        "Rev": "2788f0dbd16903de03cb8186e5c7d97b69ad387b"
                },
                {
                        "ImportPath": "github.com/kr/pretty",
                        "Comment": "go.weekly.2011-12-22-24-gf31442d",
                        "Rev": "f31442d60e51465c69811e2107ae978868dbea5c"
                },
                {
                        "ImportPath": "github.com/kr/text",
                        "Rev": "6807e777504f54ad073ecef66747de158294b639"
                },
                {
                        "ImportPath": "github.com/pmezard/go-difflib/difflib",
                        "Rev": "f78a839676152fd9f4863704f5d516195c18fc14"
                },
                {
                        "ImportPath": "golang.org/x/tools/go/vcs",
                        "Rev": "1f1b3322f67af76803c942fd237291538ec68262"
                }
        ]
}
JasonCoombs commented 8 years ago

SOLUTION (*)

$sudo apt-get remove gccgo-go
$curl -O https://storage.googleapis.com/golang/go1.6.2.linux-amd64.tar.gz
$tar -xvf go1.6.2.linux-amd64.tar.gz
$sudo mv go /usr/local

Add the following to .bashrc

export PATH=$PATH:/usr/local/go/bin

Remember:

$source .bashrc

(*) Installation instructions per https://golang.org/doc/install

Now:

$go version
go version go1.6.2 linux/amd64

$godep version
godep v74 (linux/amd64/xgcc (Ubuntu 4.9.3-0ubuntu4) 4.9.3)

Current behavior

Happiness

Recommendation

Somebody tell @Ubuntu to update its repository?