Failure installing Go dependency - go

I have installed Go on my server using the golang repo for CentOS 6.4. The paths are set correctly and I can run go version. When I try to download the package below I receive this error. Any help is appreciated
go get github.com/fiorix/freegeoip
# github.com/fiorix/freegeoip
cannot create <nil>/go.o: No such file or directory

googling that error I came across a thread that suggests that this is a bug with detecting a missing TMPDIR environment variable, for compiling the source during go get.
run export TMPDIR=/tmp and it should work.
See here:
https://groups.google.com/forum/#!topic/golang-dev/LnxmgwB0r3Q

Related

No version set for command go

I attempted to check the version of my go executable with go version on an Ubuntu machine, however I got the following error:
No version set for command go
Consider adding one of the following versions in your config file at
golang 1.16.8
golang 1.17.1
How do I resolve this? I have no prior experience with config file, I searched on google but I found nothing which could solve this issue.
That seems to be an error message from asdf-vm/asdf, a tool which manages multiple runtime versions with a single CLI tool, extendable via plugins.
You can see that error message in asdf-vm/asdf issue 838.
The config file should be in $HOME/.tool-versions
To resolve this, as in this example:
asdf plugin add go
asdf install go latest

libprotoc.so.9: cannot open shared object file: in IntelliJ

I'm trying to get protocol buffer working with intelliJ and gradle. However, I'm running into this error:
Execution failed for task ':generateProto'.
protoc: stdout: . stderr: protoc: error while loading shared libraries: libprotoc.so.9: cannot open shared object file: No such file or directory
I've seen this post: Protobuf cannot find shared libraries that explains the situation. But my question is that everything runs perfect on terminal as shown below:
yuefengzhao#zyf-ubuntu:~$ which protoc /usr/local/bin/protoc
yuefengzhao#zyf-ubuntu:~$ protoc --version libprotoc 2.6.1
But it's just not working at all on intelliJ. I'm not sure if intelliJ is configured so that protoc is pointing to eleswhere rather than what's set up in terminal.
scrrenshot of build.gradle and error message
Also, it's one of the requirements that I have to use protobuf v2.6.1
I've spent many hours trying and failing, looking for tons of solutions online but still couldn't wrap my head around.
Any help would be appreciated!
After debugging all night, I figured it's path to protoc that causing the problem. In my system terminal, protoc points to /usr/local/bin as expected when I do which protoc. But IntelliJ somehow gets a different path, pointing to /yuefeng/bin which is under /home.
The solutions is to start IntelliJ from system terminal instead of GUI (I'm using ToolBox) - a suggestion from IntelliJ support team.
I guess this is just a glitch from IntelliJ.

can not get singularity to compile, failed to get package version

Ubuntu 20.04, downloaded singularity 3.7.3.tar.gz, sha256 matches, unzipped it and followed instructions but keep getting
Failed to get package version. Abort.
Any quick suggestions what I'm missing. I installed GO using a snap, and when I check the version I get
$ go version go version go1.16.3 linux/amd64
What am I missing. Thx, J.
I found a bug / problem!
In the file
/singularity/mconfig
is some code to check the version?
# if test -z "${package_version}" ; then
# echo "Failed to get package version. Abort."
# exit 1
# fi
I can't tell why this doesn't work because the file it is looking for is present.
If I comment out this code, the config, compile and install work seamlessly and do produce the correct version information! The syslabs.io people make it incredibly difficult to contact them to suggest a bug.
V2, got it to work, this is new to me but the quirk was I was downloading the .tar.gz into a directory that was already within a git repo. This affects where mconfig looks for the "VERSION" file and causes an error. Created a new directory outside any git repo's, dowloaded, untarred and mconfig,make, and make install all worked fine. Strange thae where it looks for VERSION file is changed?

Issues installing a go program

Im new to go and I have been unable to find any thing online for my issue.
I have downloaded this code https://github.com/hashicorp/http-echo and I would like to set it up so I can run this command.
$ http-echo -listen=:8080 -text="hello world"
I have been getting quite a few different path issues.
Currently I have the code sitting in this directory.
/Users/jon/go/src/github.com/hashicorp
When I try and install it I get this error
$ go install http-echo
can't load package: /usr/local/go/src/http-echo/handlers.go:9:2: non-standard import "github.com/hashicorp/http-echo/version" in standard package "http-echo"
Where should I keep go projects on an OSX computer, and how do I get this to install or compile?
The code currently seems to be in /usr/local/go/src/http-echo. Packages should always reside in the directory $GOPATH/src/package-name, e.g.: $GOPATH/src/github.com/hashicorp/http-echo. (unless you're using go modules).
It should work if you move the source to the correct path (/Users/jon/go/src/github.com/hashicorp/http-echo). Then execute:
go install github.com/hashicorp/http-echo
Even easier would be to use go get to download the package in the first place. Simply run the following command from any directory:
go get github.com/hashicorp/http-echo
And http-echo is automagically installed.
If you still get an error after this, make sure $GOPATH/bin is in your $PATH.

Istanbul-tools installation error: github.com/ethereum/go-ethereum/crypto/bn256/cloudflare.gfpMul: relocation target runtime.support_bmi2 not defined

I am trying to install Istanbul-tools to run an IBFT ethereum network as shown in this tutorial here https://medium.com/getamis/istanbul-bft-ibft-c2758b7fe6ff
I am installing istanbul-tools via their makefile using
go build -v -o ./build/bin/istanbul ./cmd/istanbul
After fixing some initial issues, as the code base hasn't been updated in a year, I then received the following error:
github.com/ethereum/go-ethereum/crypto/bn256/cloudflare.gfpMul: relocation target runtime.support_bmi2 not defined
I also cannot find the Cloudflare file in any location in the go-ethereum folder. Can someone point me in the right direction? Cheers!
I had this exact issue, the issue has to do with your Ethereum/Istanbul Versions. You either need to make sure everything is upgraded all the way, or downgrade Go. I downgraded my go version to 1.10.3 and it worked.
Can you be provide more details on the specific Cloudflare file you are looking for? There is a folder for Cloudflare within crypto/bn256 (full path is go-ethereum(or project name)/crypto/bn256/cloudflare) in the Main Ethereum project, I would check there for Istanbul.

Resources