I followed the installation instructions - however:
lamb@silent:~/src/github.com/couchbase/query$ ./build.sh
go get -d -v ./...
cd parser/n1ql
go tool yacc n1ql.y
go build
# github.com/couchbase/go_json
../../../go_json/encode.go:1245: undefined: atomic.Value
go fmt ./...
[... and 3 other times this error ... ]
lamb@silent:~/cbq-server/src/github.com/couchbase/query$ ./build.sh
go get -d -v ./...
cd parser/n1ql
go tool yacc n1ql.y
go build
# github.com/couchbase/go_json
../../../go_json/encode.go:1245: undefined: atomic.Value
go fmt ./...
cd server/cbq-engine
go build
# github.com/couchbase/go_json
../../../go_json/encode.go:1245: undefined: atomic.Value
cd shell/cbq.old
go build
# github.com/couchbase/go_json
../../../go_json/encode.go:1245: undefined: atomic.Value
cd shell/cbq
go build
# github.com/couchbase/go_json
../../../go_json/encode.go:1245: undefined: atomic.Value
cd tutorial
go build
go install ./...
# github.com/couchbase/go_json
../go_json/encode.go:1245: undefined: atomic.Value
lamb@silent:~/cbq-server/src/github.com/couchbase/query$ ./build.sh
go get -d -v ./...
cd parser/n1ql
go tool yacc n1ql.y
go build
# github.com/couchbase/go_json
../../../go_json/encode.go:1245: undefined: atomic.Value
go fmt ./...
cd server/cbq-engine
go build
# github.com/couchbase/go_json
../../../go_json/encode.go:1245: undefined: atomic.Value
cd shell/cbq.old
go build
# github.com/couchbase/go_json
../../../go_json/encode.go:1245: undefined: atomic.Value
cd shell/cbq
go build
# github.com/couchbase/go_json
../../../go_json/encode.go:1245: undefined: atomic.Value
cd tutorial
go build
go install ./...
# github.com/couchbase/go_json
../go_json/encode.go:1245: undefined: atomic.Value
#!/bin/bash
# Credits to the owner of the script https://gist.github.com/jacoelho/fb989f8c25c3ca7d5db5
# If you have some version of golang, make sure to unistall it first
# Preparation:
# :# apt-get remove golang
# or purge, depending on taste
#
# :# apt-get autoremove
# Probably there will be leftover packages. I tend to keep a neat system
# Make sure only root can run our script
if [ "$(id -u)" != "0" ]; then
echo "installGOLang.sh needs to run as root!" 1>&2
exit 1
fi
export GOLANG_VERSION=1.7.5
export GOLANG_DOWNLOAD_URL=https://golang.org/dl/go$GOLANG_VERSION.linux-amd64.tar.gz
export GOLANG_DOWNLOAD_SHA256=2e4dd6c44f0693bef4e7b46cc701513d74c3cc44f2419bf519d7868b12931ac3
apt-get update -qq
apt-get install -y --no-install-recommends \
g++ \
gcc \
libc6-dev \
make \
git-core
curl -fsSL "$GOLANG_DOWNLOAD_URL" -o golang.tar.gz \
&& echo "$GOLANG_DOWNLOAD_SHA256 golang.tar.gz" | sha256sum -c - \
&& tar -C /usr/local -xzf golang.tar.gz \
&& rm golang.tar.gz
for bin in $(ls /usr/local/go/bin/); do
test -f /usr/bin/$bin && rm /usr/bin/$bin
update-alternatives --install /usr/bin/$bin $bin /usr/local/go/bin/$bin 1
update-alternatives --set $bin /usr/local/go/bin/$bin
done