main.go:4: running "go-bindata": exec: "go-bindata": executable file not found in %PATH%
kwhitefoot opened this issue · 10 comments
Cloned the repo.
Tried running
go generate -v -x
in a cmd window on Win 10 in the hostyoself directory.
Got this response:
...
go: finding github.com/jteeuwen/go-bindata/go-bindata latest
go: downloading github.com/jteeuwen/go-bindata v3.0.7+incompatible
go: extracting github.com/jteeuwen/go-bindata v3.0.7+incompatible
github.com/jteeuwen/go-bindata
github.com/jteeuwen/go-bindata/go-bindata
go-bindata -pkg server -o pkg/server/assets.go templates/ static/
main.go:4: running "go-bindata": exec: "go-bindata": executable file not found in %PATH%
Hm, do you have your $GOPATH/bin in your environmental variables?
Exactly what do you mean? I think you are on the right lines because PATH and GOPATH don't seem to me to match up. But then I know bugger all about go (stupid name and very difficult to do a web search on).
Here is my PATH and GOPATH:
D:\home\kj\Documents\GitHub\hostyoself>echo %PATH%
D:\Python27;D:\Python27\Scripts;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\iCLS;C:\Program Files\Intel\Intel(R) Management Engine Components\iCLS;C:\windows\system32;C:\windows;C:\windows\System32\Wbem;C:\windows\System32\WindowsPowerShell\v1.0;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\dotnet;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn;C:\Program Files\Microsoft SQL Server\140\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\140\DTS\Binn;C:\Program Files\Microsoft SQL Server\140\DTS\Binn;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\ManagementStudio;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0;C:\WINDOWS\System32\OpenSSH;C:\Program Files (x86)\IVI Foundation\IVI\bin;C:\Program Files\IVI Foundation\IVI\bin;D:\Program Files (x86)\GtkSharp\2.12\bin;d:\Program Files (x86)\Groovy\Groovy-3.0.0\bin;C:\Program Files (x86)\IVI Foundation\VISA\WinNT\Bin;C:\Program Files\IVI Foundation\VISA\Win64\Bin;C:\Program Files (x86)\IVI Foundation\VISA\WinNT\Bin;%BPADir%;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\Git\cmd;C:\Program Files (x86)\Windows Live\Shared;D:\Go\bin;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\Users\kwhit.cargo\bin;C:\Users\kwhit\AppData\Local\Microsoft\WindowsApps;D:\home\kj\bin\nim-0.18.0_x64\nim-0.18.0\bin;C:\Users\kwhit\AppData\Local\Microsoft\WindowsApps;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\Users\kwhit\AppData\Local\GitHubDesktop\bin;C:\Exercism;d:\Users\kwhit\AppData\Local\Programs\Microsoft VS Code\bin;C:\Users\kwhit\go\binD:\home\kj\Documents\GitHub\hostyoself>echo %GOPATH%
D:\home\kj\go
Does that suggest anything useful?
Yes, that looks good.
Can you try
$ go install -v github.com/jteeuwen/go-bindata/...
$ go generate -v
:-(
D:\home\kj\Documents\GitHub\hostyoself>go install -v github.com/jteeuwen/go-bindata/...
D:\home\kj\Documents\GitHub\hostyoself>go generate -v
main.go
go: finding github.com/jteeuwen/go-bindata/go-bindata latest
main.go:4: running "go-bindata": exec: "go-bindata": executable file not found in %PATH%
Okay, go generate
is just running one command, so why don't you just try running
$ go-bindata.exe -pkg server -o pkg/server/assets.go templates/ static/
in the hostyoself
directory?
Then you should be able to do go build
.
I am working on Windows too and I have no idea why go generate
is not working for you...
Doesn't work, for me:
D:\home\kj\Documents\GitHub\hostyoself>go-bindata.exe -pkg server -o pkg/server/assets.go templates/ static/
'go-bindata.exe' is not recognized as an internal or external command,
operable program or batch file.
Can you see if go-bindata is in you GOPATH/bin?
No it's not.
For reasons unknown, to me at least, GOPATH is:
D:\home\kj\go
but the full path to go-bindata.exe is:
D:\home\kj\go\bin\go-bindata.exe
Perhaps I should reinstall go using defaults for everything. I'll try that later, for now I'm taking a four day road trip.
:-)
Thanks for the help.
Ohhh! Okay I was confused. I saw this in your PATH above: C:\Users\kwhit\go\bin
. But it seems that's not your GO bin/ folder.
Please add D:\home\kj\go\bin
to your PATH variable and then everything will just work.
I recently forked this project, fixed up the code to use embed and the latest Go compiler and have a version running at serve.mills.io 👌