Closed raphink closed 9 years ago
Just for the sake of mentioning, do you have git and mercurial installed?
git yes, mercurial no
Installed mercurial, and now I get:
$ go get github.com/jingweno/ccat
package encoding: unrecognized import path "encoding"
Not sure if this is entirely on topic, but I don't think your meant to set goroot env variable. Read more here: http://dave.cheney.net/2013/06/14/you-dont-need-to-set-goroot-really
However, I also think its GOROOT=/usr/share/go
not GOROOT=/usr/local/go
OK then…
$ unset GOROOT
$ go get github.com/jingweno/ccat
# sourcegraph.com/sourcegraph/srclib/store
../../go/src/sourcegraph.com/sourcegraph/srclib/store/fs_store.go:666: syntax error: unexpected range, expecting {
../../go/src/sourcegraph.com/sourcegraph/srclib/store/fs_store.go:676: syntax error: unexpected semicolon or newline, expecting )
../../go/src/sourcegraph.com/sourcegraph/srclib/store/fs_store.go:678: syntax error: unexpected ), expecting semicolon or newline or }
../../go/src/sourcegraph.com/sourcegraph/srclib/store/fs_store.go:682: non-declaration statement outside function body
../../go/src/sourcegraph.com/sourcegraph/srclib/store/fs_store.go:683: non-declaration statement outside function body
../../go/src/sourcegraph.com/sourcegraph/srclib/store/fs_store.go:684: non-declaration statement outside function body
../../go/src/sourcegraph.com/sourcegraph/srclib/store/fs_store.go:685: non-declaration statement outside function body
../../go/src/sourcegraph.com/sourcegraph/srclib/store/fs_store.go:686: syntax error: unexpected }
Maybe you can try:
mkdir -p ./ccat/bin cd ./ccat export GOPATH=$(pwd) export PATH=$PATH:$GOPATH/bin export GOBIN=$GOPATH/bin go get github.com/jingweno/ccat go install src/github.com/jingweno/ccat/*.go
I would say try to just properly install go with tools https://golang.org/doc/install
So the packaged Ubuntu version is not working @yegortokmakov ?
@raphink gccgo-go didn't work for me, it failed with similar errors. with official tarball it worked
@raphink Ubuntu 14.04 Go version is to old (1.2), I add to install a more recent version manually.
This is due to the srclib dependency on Go 1.4+, see: https://srclib.org/install/#dependencies
You'd need Go 1.4+ to compile from source. I'm planning to provide pre-compiled binaries to make it easier for you. Let me know if you still can't get it working
Fails with same error on XUbuntu 15.04
Packaged go in ubuntu is more than 1 year old. Just uninstal it and install from golang.org.
Precompiled binaries are now available for the latest version: https://github.com/jingweno/ccat/releases/tag/v0.1.0. Ideally you won't need to compile yourself with Go on any platform.
Closing.
Is there a PPA?
@mslinn I'm planning to do that. Stay tuned.
Is there a PPA for Ubuntu 12.04 ?
Am I doing something wrong here?