How to compile gomuks on Ubuntu? - go

Trying to compile gomuks, following its insallation instructions, I get this error:
$ go install
gomuks.go:25:2: cannot find package "maunium.net/go/gomuks/config" in any of:
/usr/lib/go-1.10/src/maunium.net/go/gomuks/config (from $GOROOT)
/home/ettinger/go/src/maunium.net/go/gomuks/config (from $GOPATH)
gomuks.go:26:2: cannot find package "maunium.net/go/gomuks/debug" in any of:
/usr/lib/go-1.10/src/maunium.net/go/gomuks/debug (from $GOROOT)
/home/ettinger/go/src/maunium.net/go/gomuks/debug (from $GOPATH)
gomuks.go:27:2: cannot find package "maunium.net/go/gomuks/interface" in any of:
/usr/lib/go-1.10/src/maunium.net/go/gomuks/interface (from $GOROOT)
/home/ettinger/go/src/maunium.net/go/gomuks/interface (from $GOPATH)
gomuks.go:28:2: cannot find package "maunium.net/go/gomuks/matrix" in any of:
/usr/lib/go-1.10/src/maunium.net/go/gomuks/matrix (from $GOROOT)
/home/ettinger/go/src/maunium.net/go/gomuks/matrix (from $GOPATH)
main.go:30:2: cannot find package "maunium.net/go/gomuks/ui" in any of:
/usr/lib/go-1.10/src/maunium.net/go/gomuks/ui (from $GOROOT)
/home/ettinger/go/src/maunium.net/go/gomuks/ui (from $GOPATH)
What is the reason, how to solve it?

This repo uses Go modules feature and installation instructions clearly state it requires Go 1.13 or higher:
Install Go 1.13 or higher
From error messages it seems you have Go 1.10 which doesn't support modules (and likely also other features this repo depends on).
This error is caused by fact that prior modules support was added to Go in version 1.11; go tool was always looking up modules in $GOROOT and $GOPATH locations - and in your case it can't find them there.
Install Go 1.13 or higher to make the installation guide work. You can find recent enough packages in backport PPA or install latest from official tarball available here.

Related

How to read stix data from hail a taxii

Want to read stix data from http://hailataxii.com/ but not getting the idea to get that!!
For how to connect they have provided not much info and haven't found any documentation regarding it. Thought of using freetaxiiserver (Go package) getting an error while installing it. https://github.com/freetaxii/server#freetaxiiserver
go get -u -v github.com/freetaxii/server/cmd/freetaxii
cd github.com/freetaxii/server/cmd/freetaxii
Error
1] for first command
package github.com/freetaxii/libstix2/resources/collections: cannot find package "github.com/freetaxii/libstix2/resources/collections" in any of:
/usr/local/go/src/github.com/freetaxii/libstix2/resources/collections (from $GOROOT)
/home/rohith/go/src/github.com/freetaxii/libstix2/resources/collections (from $GOPATH)
package github.com/freetaxii/libstix2/objects/baseobject: cannot find package "github.com/freetaxii/libstix2/objects/baseobject" in any of:
/usr/local/go/src/github.com/freetaxii/libstix2/objects/baseobject (from $GOROOT)
/home/rohith/go/src/github.com/freetaxii/libstix2/objects/baseobject (from $GOPATH)
2] for the second command
bash: cd: github.com/freetaxii/server/cmd/freetaxii: No such file or directory
have installed its required dependency.
Is there any way to read data hailTaxii or if I get documentation will be helpfull.

can't find attrmgr (from $GOROOT) and $GOPATH?

I am trying to install chaincode. I used cid package inside my chaincode When I try to install chaincode, I got the following error:
cannot load package:
package github.com/hyperledger/fabric/core/chaincode/lib/cid: cannot find package "github.com/hyperledger/fabric/core/chaincode/lib/cid" in any of:
/opt/go/src/github.com/hyperledger/fabric/core/chaincode/lib/cid (from $GOROOT)
/opt/gopath/src/github.com/hyperledger/fabric/core/chaincode/lib/cid (from $GOPATH)
I have used glide tool( here https://github.com/Masterminds/glide) to fix it,
now i see another error that I couldn't fix which is:
Error: could not assemble transaction, err proposal response was not successful, error code 500, msg error starting container: error starting container: Failed to generate platform-specific docker build: Error returned from build: 1 "chaincode/input/src/github.com/chaincode/vendor/github.com/hyperledger/fabric/core/chaincode/lib/cid/cid.go:29:2: cannot find package "github.com/hyperledger/fabric/common/attrmgr" in any of:
/chaincode/input/src/github.com/chaincode/vendor/github.com/hyperledger/fabric/vendor/github.com/hyperledger/fabric/common/attrmgr (vendor tree)
/chaincode/input/src/github.com/chaincode/vendor/github.com/hyperledger/fabric/common/attrmgr
/opt/go/src/github.com/hyperledger/fabric/common/attrmgr (from $GOROOT)
/chaincode/input/src/github.com/hyperledger/fabric/common/attrmgr (from $GOPATH)
/opt/gopath/src/github.com/hyperledger/fabric/common/attrmgr
Any suggestion؟
Install the fabric dependency in your GOPATH, go get -u github.com/hyperledger/fabric

cannot find vendor package in windows

I have my GOPATH and GOROOT set, currently trying to use a package located in the vendor folder, while doing go run in my windows I get
C:\resume>go run docs/generator.go
docs\generator.go:13:2: cannot find package "github.com/tidwall/gjson" in any
of:
C:\Go\src\github.com\tidwall\gjson (from $GOROOT)
C:\resume\src\github.com\tidwall\gjson (from $GOPATH)
My GOROOT=C:\Go, GOPATH=C:\resume and PATH=C:\Go\bin

go install command with glide on windows

I'm having trouble running the go install $(glide nv) command.
I run this command from within my project's folder within the src folder of the go workspace directoy
so basically I do :
%GOPATH%/src/my/project/ go install $(glide nv)
The error message I get is as follow :
can't load package: package $(glide: cannot find package "$(glide" in any of:
C:\Go\src\$(glide (from $GOROOT)
W:\GO_WORKSPACE\src\$(glide (from $GOPATH)
can't load package: package nv): cannot find package "nv)" in any of:
C:\Go\src\nv) (from $GOROOT)
W:\GO_WORKSPACE\src\nv) (from $GOPATH)
I had previously run glide install without a problem on that project.
What am I missing?
It works on powershell. At the project directory run command:
go install $(glide nv)

Cannot find package "testing/internal/testdeps"

When I try to run go test I've got that message:
package testmain
imports testing/internal/testdeps: cannot find package "testing/internal/testdeps" in any of:
/usr/local/go/src/testing/internal/testdeps (from $GOROOT)
/Users/myname/go/src/testing/internal/testdeps (from $GOPATH)
FAIL github.com/dzyanis/olyalya/cmd [setup failed]
I think it is happened after I've installed a package manager Glide, but I'm not sure. Does anyone know how to fix that?
UPDATE: I've reinstalled Go and everything works well. That's it.
I fixed it by set:
export $GOROOT=

Resources