I just installed Golang on my Windows box today, and I have my %GOPATH% set. However, when I run go install {...} for various binaries, Windows can't find the executables. My %GOROOT% is C:\Go, the default .msi install location.

PS C:\Users\{user}\Development\go> ls
    Directory: C:\Users\{user}\Development\go


Mode                LastWriteTime     Length Name
----                -------------     ------ ----
d----        12/11/2015   9:02 PM            bin
d----        12/11/2015  11:08 AM            pkg
d----        12/11/2015  11:08 AM            src
C:\Users\{user}\Development\go>echo %GOPATH%
C:\Users\{user}\Development\go

Do I have the environmental variables set incorrectly?

asked Dec 12, 2015 at 4:10

Sienna's user avatar

SiennaSienna

1,6993 gold badges30 silver badges50 bronze badges

Windows can't find the executables

If you mean the executable built from your go programs (by go install) and delivered by Go in %GOPATH%\bin, all you need is to add to your PATH environment variable %GOPATH%\bin (in addition of %GOROOT%\bin)

set PATH=%PATH%;%GOPATH%\bin
cd %GOPATH%\src\path\to\a\go\project
go install

Then you can call your executable, and Windows will find it in %GOPATH%\bin (the C:\Users\{user}\Development\go\bin folder)

answered Dec 12, 2015 at 4:58

VonC's user avatar

VonCVonC

1.3m563 gold badges4.7k silver badges5.6k bronze badges

1

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.