Install external package in Google Go - go

I was trying to install external packages in GO language. I've found many external packages at http://godashboard.appspot.com/package.
I am working on windows system.
I tried this command to install go-router package.
goinstall go-router.googlecode.com/svn/trunk
This resulted in following error....
C:\cygwin\bin\bash.exe: === cd c:\go\src\pkg\go-router.googlecode.com\svn\trunk;
bash gomake -f- install
/cygdrive/c/go/bin/gomake: line 3: exec: make: not found
--- exit status 127
goinstall: go-router.googlecode.com/svn/trunk: install: running bash: exit status 127
I am unable to find out the reason for the error and the meaning of status code. I've read the goinstall command description but no luck..

It seems make command is missing. Make sure it's installed and that PATH variable is defined correctly.

Related

Error message:protoc-gen-go: Plugin failed with status code 1

This is not a duplicate question
First, I made sure I have the following configuration:
1 export GOPATH=/Users/chezixin/go
2 export GOBIN=/Users/chezixin/go/bin
3
4 export GO111MODULE=on
5 # 123
6 export GOPROXY=https://goproxy.cn
7
8
9 export PATH="$PATH:/Applications/Postgres.app/Contents/Versions/12/bin:/Users/chezixin/flutterSDK/flutter/bin:/usr/local/go/bin:$GOPATH:$GOBIN"
10
czxmac:~ chezixin$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/sbin:
/sbin:/Applications/VMwareFusion.app/Contents/Public:
/Applications/Postgres.app/Contents/Versions/latest/bin:
/Applications/Postgres.app/Contents/Versions/12/bin:
/Users/chezixin/flutterSDK/flutter/bin:/usr/local/go/bin:
/Users/chezixin/go:/Users/chezixin/go/bin':
/Users/chezixin/Go/bin:/Applications/Postgres.app/Contents/Versions/12/bin:
/Users/chezixin/flutterSDK/flutter/bin:
/usr/local/go/bin:/Users/chezixin/go:
/Users/chezixin/go/bin:/Users/chezixin/Go/bin
Already installed:
go get -u google.golang.org/grpc
look protoc:
czxmac:~ chezixin$ protoc --version
libprotoc 3.11.1
Protoc-gen-go is installed and exists in $ GOPATH/bin
go get -u github.com/golang/protobuf/protoc-gen-go
problem:
When I execute the following command
$ protoc --go_out=plugins=grpc:. *.proto
An error occurred:
protoc-gen-go: program not found or is not executable
Please specify a program using absolute path or make sure the program is available in your PATH system variable
--go_out: protoc-gen-go: Plugin failed with status code 1.
Where is the problem, please master guidance.
This issue is related with your PATH variable, please set it again.
I can see a typo of an extra trailing apostrophe(') in this line of PATH variable. /Users/chezixin/go:/Users/chezixin/go/bin':
Try updating it to
/Users/chezixin/go:/Users/chezixin/go/bin:
For anyone facing a similar issue, but it was not the case of an invalid PATH variable, I very much sympathize with you.
I realized that I had to install the compiler (again?) before it started working. I hadn't installed it before, but it appeared to already be downloaded. I guess I had to install it again or update it.
I personally was using betterproto, and I followed the instructions here to install it with the protoc plugin and try out their example.

Issue on building .bff package in AIX 7.1

While I am trying to create AIX package (.bff) I am getting following error.
bash-4.2# make package
cd buildroot; makebff /usr/bin/sh: makebff: not found make: The error code from the last command is 127.
Stop.
I believe some environmental path reference are broken. Could some one please help

when executing the go get command to install fabric-ca, I'm getting an error

when executing
go get -u github.com/hyperledger/fabric-ca/cmd/
from the fabric-ca guide, I get the following error:
# cd /home/pi/go/src/github.com/hyperledger/fabric-ca; git pull --ff-only
error: cannot open .git/FETCH_HEAD: Permission denied
package github.com/hyperledger/fabric-ca/cmd: exit status 1`
I tried git cloning and it downloaded everything from the fabric-ca repository, then I tried installing fabric-server and client by myself like this:
sudo make fabric-ca-server
this also produced the following error:
Building fabric-ca-server in bin directory ...
/bin/sh: 1: go: not found
Makefile:91: recipe for target 'bin/fabric-ca-server' failed
make: *** [bin/fabric-ca-server] Error 127
Looks like your GOPATH is set to /home/pi/go and appears that you do not have access to somewhere along the path to /home/pi/go/src/github.com/hyperledger/fabric-ca.
I'd check make sure that the user you are running go get with has R/W access to /home/pi/go/src

Unable to change GO version in PhotonOS

I have deployed PhotonOS using directions from photon and VIC configuration, while running command docker run -v $(pwd):/go/src/github.com/vmware/vic \-w /go/src/github.com/vmware/vic golang:1.6 make all
an Error appears:
Please install go1.7 (found: go version go1.6.3 linux/amd64)
Makefile:152: recipe for target 'goversion' failed
make: *** [goversion] Error 1
`
to solve it I have tried to update
go1.6.3 to go1.7 using solution - changeing go version manually
after steps go version is showing go1.4.2, but the previous error still complains on go version 1.6.3.
Also, I have tried to install "gvm" using bash < <(curl -s -S -L https://raw.github.com/moovweb/gvm/master/binscripts/gvm-installer) , whenever I try to call gvm install go1.7 it brings
-bash: gvm: command not found
whenever I retry running gvm-installer it says
ERROR: Already installed!
Any help is highly appreciated!!
use :
docker run -v $(pwd):/go/src/github.com/vmware/vic \-w /go/src/github.com/vmware/vic golang:1.7 make all
command instead, that will work on PhotonOS

Can't install PDQ tool for R on windows

I've been trying for half an hour following this simple guide http://www.perfdynamics.com/Tools/PDQcode.html#tth_sEc1.1.1
It simply throws this error:
> install.packages("C:\\Users\\Neven\\Downloads\\pdq_6.0-1.tar.gz",repos=NULL,type="source")
Warning: invalid package 'C:/Users/Neven/Downloads/pdq_6.0-1.tar.gz'
Error: ERROR: no packages specified
Warning messages:
1: running command '"C:/PROGRA~1/R/R-30~1.2/bin/x64/R" CMD INSTALL -l "C:\ProgramFiles\R\R-3.0.2\library" "C:/Users/Neven/Downloads/pdq_6.0-1.tar.gz"' had status 1
2: In install.packages("C:\\Users\\Neven\\Downloads\\pdq_6.0-1.tar.gz", :
installation of package ‘C:/Users/Neven/Downloads/pdq_6.0-1.tar.gz’ had non-zero exit status
I've been searching for an answer on the website, trying different things but nothing did it.
I was copy/pasting the command from their documentation and it seems their documentation is out of date.
The command is:
install.packages("C:\\Users\\Neven\\Downloads\\pdq_6.0-1.tar.gz",repos=NULL,type="source")
Since there's a new version of R (6.1-1), it should be:
install.packages("C:\\Users\\Neven\\Downloads\\pdq_6.1-1.tar.gz",repos=NULL,type="source")
Really stupid mistake, but that's what solved the problem.

Resources