Go moq : running "moq": exec: "moq": executable file not found in $PATH

Racater :

when trying the example of the moq framework, I get the following exception when I enter "go generate":

example.go:5: running "moq": exec: "moq": executable file not found in $PATH

What should I do? I'm using Kubuntu 16.04

PS: I tried

export PATH=$PATH:/home/[...]/go/src/github.com/matryer/moq

without success

Racater :

@sprabhakaran got the right answer. I only needed to add the go binary folder to the PATH global variable:

export PATH=$PATH:/home/[...]/go/bin

and if it doesn't work, check that moq was correctly installed.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

gcloud app deploy says: exec: "git": executable file not found in $PATH

Golang docker multi-stage build failing to run: exec: "go": executable file not found in $PATH

"exec: \"go\": executable file not found in $PATH"

exec: "gcc": executable file not found in %PATH% when trying go build

exec: executable file not found in $PATH

exec: "sqlboiler": executable file not found in $PATH

godep: exec: "go": executable file not found in $PATH

docker-exec failed: "cd": executable file not found in $PATH

exec: "com.docker.cli": executable file not found in $PATH

DbSet Find with Moq (EntityFramework.Testing.Moq)

Moq and SqlConnection?

System error: exec: "deployment": executable file not found in $PATH

Moq a property of concrete class with another moq

Moq and file/data saving in C#

"sqlplus": executable file not found in $PATH" when running a command with docker exec

Create Moq for Epplus Excel file

Moq, how to moq objects with private constructor?

Moq: running flows with FluentValidation

Error running docker container: starting container process caused "exec: \"python\": executable file not found in $PATH": unknown

"exec: "python": executable file not found in $PATH

docker local registry "exec: \"htpasswd\": executable file not found in $PATH"

Guid not being found in Moq XUnit

moq and the "as" keyword

Is this a bad Moq setup or a deficiency in Moq?

Moq: Moq is setup but doesn't think it is called

How moq File.Delete (IFileSystem) in app MVC Moq

Docker Go image: starting container process caused: exec: "app": executable file not found in $PATH: unknown

Getting "protoc": executable file not found in $PATH when running "go generate" command

hyperledger fabric - "go": executable file not found in $PATH