cdr-pusher
cdr-pusher copied to clipboard
error coming when I try to build
I am installing cdr pusher for Kamailio in centos6 64 bit I have installed go 1.8 Linux/amd64 version git 1.7.12.4 version
and when I try to build so getting below error "can't load package: package ./archive: found packages fetch (fetch_orm.go) and main (insert_gorm.go) in /opt/app/cdr-pusher/archive src/github.com/ssdb/gossdb/test.go:7:2: local import "./ssdb" in non-local package make: *** [get] Error 1" Thanks
Hello I have similar issue: CentOS 6.8 go1.8 installed:
can't load package: package ./archive: found packages fetch (fetch_orm.go) and main (insert_gorm.go) in /opt/app/cdr-pusher/archive
src/github.com/ssdb/gossdb/test.go:7:2: local import "./ssdb" in non-local package
make: *** [get] Error 1
Also tried with go1.4.2 but then errors are:
github.com/go-sql-driver/mysql
src/github.com/go-sql-driver/mysql/packets.go:1087: v.In(mc.cfg.Loc).AppendFormat undefined (type time.Time has no field or method AppendFormat)
make: *** [build] Error 2
And if I run again 'make build'
imports github.com/syndtr/goleveldb/leveldb/iterator
imports github.com/syndtr/goleveldb/leveldb/opt
imports github.com/siddontang/rdb
imports github.com/cupcake/rdb
imports github.com/cupcake/rdb/nopdecoder
imports github.com/kr/pty
imports context: unrecognized import path "context"
make: *** [get] Error 1
And if I run again 'make build' a few times:
found packages fetch_orm.go (fetch) and insert_gorm.go (main) in archive
package github.com/couchbase/go_n1ql
imports context: unrecognized import path "context"
package github.com/couchbase/go_n1ql
imports go/constant: unrecognized import path "go/constant"
package github.com/couchbase/go_n1ql
imports go/types: unrecognized import path "go/types"
package github.com/couchbase/go_n1ql
imports go/importer: unrecognized import path "go/importer"
package github.com/couchbase/go_n1ql
imports runtime/trace: unrecognized import path "runtime/trace"
make: *** [get] Error 1
How can I resolve this issue, where I'm wrong? Thanks a lot
Best regards, Denislav
Hi, I am having same issue on debian 8;
/opt/app/cdr-pusher# make build can't load package: package ./archive: found packages fetch (fetch_orm.go) and main (insert_gorm.go) in /opt/app/cdr-pusher/archive Makefile:26: recipe for target 'get' failed make: *** [get] Error 1
did you guys fix it?
Thanks
Jon
Hello,
Here my Makefile: `BINARY = ./bin/cdr-pusher
install-daemon: go install ./...
deps: go get .
clean: rm $(BINARY)
test: go test . golint
servedoc: godoc -http=:6060
configfile: cp -i cdr-pusher.yaml /etc/cdr-pusher.yaml
logdir: @mkdir /var/log/cdr-pusher
get: @go get -d ./...
build: get configfile @mkdir -p bin @go build -a -o bin/cdr-pusher .`
Also which version of go you use (my is 1.8)
And run:
cd cdr-pusher/ mkdir bin go build -a -o bin/cdr-pusher .
You could try and:
go get -d -v -fix ./...
I hope this help...
Hey I know this is rather old but I need to get cdr-pusher running on debian 8.10 for my company. Do anyone out there made it working with deb 8 or even debian 7?
The solution is to rename or remove archive folder, thus "go get" wouldn't search in it, and anyway is not used by cdr-pusher at build at all. (errors appear because "packages" defined by fetch_orm.go & insert_beego.go don't have subdirs for themselves as go docs requires: https://golang.org/doc/code.html):
-
clean the previous compile:
make clean
-
than:
mv archive .archive
or:mv archive /tmp
orrm -rf archive
-
than, rebuild it:
make build